C# Класс 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.
Наследование: SharpCifs.Util.Sharpen.InputStream
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
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.

Защищенные методы

Метод Описание
SeToIoe ( SmbException se ) : IOException

Приватные методы

Метод Описание
SmbFileInputStream ( SmbFile file, int openFlags ) : System

Описание методов

Available() публичный Метод

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
Результат int

Close() публичный Метод

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
Результат void

Read() публичный Метод

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
Результат int

Read() публичный Метод

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
Результат int

Read() публичный Метод

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
Результат int

ReadDirect() публичный Метод

public ReadDirect ( byte b, int off, int len ) : int
b byte
off int
len int
Результат int

SeToIoe() защищенный Метод

protected SeToIoe ( SmbException se ) : IOException
se SmbException
Результат System.IO.IOException

Skip() публичный Метод

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
Результат long

SmbFileInputStream() публичный Метод

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
Результат System

SmbFileInputStream() публичный Метод

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
Результат System