C# Class SharpCifs.Smb.SmbFileInputStream

This InputStream can read bytes from a file on an SMB file server.
This InputStream can read bytes from a file on an SMB file server. Offsets are 64 bits.
Inheritance: SharpCifs.Util.Sharpen.InputStream
Afficher le fichier Open project: brandonprry/Potato Class Usage Examples

Méthodes publiques

Méthode Description
Available ( ) : int

This stream class is unbuffered.

This stream class is unbuffered. Therefore this method will always return 0 for streams connected to regular files. However, a stream created from a Named Pipe this method will query the server using a "peek named pipe" operation and return the number of available bytes on the server.

Close ( ) : void

Closes this input stream and releases any system resources associated with the stream.

Closes this input stream and releases any system resources associated with the stream.

Read ( ) : int

Reads a byte of data from this input stream.

Reads a byte of data from this input stream.

Read ( byte b ) : int

Reads up to b.length bytes of data from this input stream into an array of bytes.

Reads up to b.length bytes of data from this input stream into an array of bytes.

Read ( byte b, int off, int len ) : int

Reads up to len bytes of data from this input stream into an array of bytes.

Reads up to len bytes of data from this input stream into an array of bytes.

ReadDirect ( byte b, int off, int len ) : int
Skip ( long n ) : long

Skip n bytes of data on this stream.

Skip n bytes of data on this stream. This operation will not result in any IO with the server. Unlink InputStream value less than the one provided will not be returned if it exceeds the end of the file (if this is a problem let us know).

SmbFileInputStream ( SmbFile file ) : System

Creates an System.IO.InputStream for reading bytes from a file on an SMB server represented by the SmbFile parameter. See SmbFile for a detailed description and examples of the smb URL syntax.

SmbFileInputStream ( string url ) : System

Creates an System.IO.InputStream for reading bytes from a file on an SMB server addressed by the url parameter. See SmbFile for a detailed description and examples of the smb URL syntax.

Méthodes protégées

Méthode Description
SeToIoe ( SmbException se ) : IOException

Private Methods

Méthode Description
SmbFileInputStream ( SmbFile file, int openFlags ) : System

Method Details

Available() public méthode

This stream class is unbuffered.
This stream class is unbuffered. Therefore this method will always return 0 for streams connected to regular files. However, a stream created from a Named Pipe this method will query the server using a "peek named pipe" operation and return the number of available bytes on the server.
public Available ( ) : int
Résultat int

Close() public méthode

Closes this input stream and releases any system resources associated with the stream.
Closes this input stream and releases any system resources associated with the stream.
if a network error occurs
public Close ( ) : void
Résultat void

Read() public méthode

Reads a byte of data from this input stream.
Reads a byte of data from this input stream.
if a network error occurs
public Read ( ) : int
Résultat int

Read() public méthode

Reads up to b.length bytes of data from this input stream into an array of bytes.
Reads up to b.length bytes of data from this input stream into an array of bytes.
if a network error occurs
public Read ( byte b ) : int
b byte
Résultat int

Read() public méthode

Reads up to len bytes of data from this input stream into an array of bytes.
Reads up to len bytes of data from this input stream into an array of bytes.
if a network error occurs
public Read ( byte b, int off, int len ) : int
b byte
off int
len int
Résultat int

ReadDirect() public méthode

public ReadDirect ( byte b, int off, int len ) : int
b byte
off int
len int
Résultat int

SeToIoe() protected méthode

protected SeToIoe ( SmbException se ) : IOException
se SmbException
Résultat System.IO.IOException

Skip() public méthode

Skip n bytes of data on this stream.
Skip n bytes of data on this stream. This operation will not result in any IO with the server. Unlink InputStream value less than the one provided will not be returned if it exceeds the end of the file (if this is a problem let us know).
public Skip ( long n ) : long
n long
Résultat long

SmbFileInputStream() public méthode

Creates an System.IO.InputStream for reading bytes from a file on an SMB server represented by the SmbFile parameter. See SmbFile for a detailed description and examples of the smb URL syntax.
public SmbFileInputStream ( SmbFile file ) : System
file SmbFile An SmbFile specifying the file to read from
Résultat System

SmbFileInputStream() public méthode

Creates an System.IO.InputStream for reading bytes from a file on an SMB server addressed by the url parameter. See SmbFile for a detailed description and examples of the smb URL syntax.
public SmbFileInputStream ( string url ) : System
url string An smb URL string representing the file to read from
Résultat System