C# Класс HttpMultipartParser.RebufferableBinaryReader

Provides methods to interpret and read a stream as either character or binary data similar to a BinaryReader and provides the ability to push data onto the front of the stream.
Наследование: IDisposable
Показать файл Открыть проект Примеры использования класса

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

Метод Описание
Buffer ( byte data ) : void

Adds data to the front of the stream. The most recently buffered data will be read first.

Buffer ( string data ) : void

Adds the string to the front of the stream. The most recently buffered data will be read first.

Read ( ) : int

Reads a single byte as an integer from the stream. Returns -1 if no data is left to read.

Read ( byte buffer, int index, int count ) : int

Reads the specified number of bytes from the stream, starting from a specified point in the byte array.

Read ( char buffer, int index, int count ) : int

Reads the specified number of characters from the stream, starting from a specified point in the byte array.

ReadByteLine ( ) : byte[]

Reads a series of bytes delimited by the byte encoding of newline for this platform. the newline bytes will not be included in the return data.

ReadLine ( ) : string

Reads a line from the stack delimited by the newline for this platform. The newline characters will not be included in the stream

RebufferableBinaryReader ( Stream input ) : System

Initializes a new instance of the RebufferableBinaryReader class. Default encoding of UTF8 will be used.

RebufferableBinaryReader ( Stream input, Encoding encoding ) : System

Initializes a new instance of the RebufferableBinaryReader class.

RebufferableBinaryReader ( Stream input, Encoding encoding, int bufferSize ) : System

Initializes a new instance of the RebufferableBinaryReader class.

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

Метод Описание
GetBomOffset ( byte buffer ) : int

Determines the byte order marking offset (if any) from the given buffer.

StreamData ( ) : int

Reads more data from the stream into the stream stack.

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

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

Adds data to the front of the stream. The most recently buffered data will be read first.
public Buffer ( byte data ) : void
data byte /// The data to buffer. ///
Результат void

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

Adds the string to the front of the stream. The most recently buffered data will be read first.
public Buffer ( string data ) : void
data string /// The data. ///
Результат void

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

Reads a single byte as an integer from the stream. Returns -1 if no data is left to read.
public Read ( ) : int
Результат int

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

Reads the specified number of bytes from the stream, starting from a specified point in the byte array.
public Read ( byte buffer, int index, int count ) : int
buffer byte /// The buffer to read data into. ///
index int /// The index of buffer to start reading into. ///
count int /// The number of bytes to read into the buffer. ///
Результат int

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

Reads the specified number of characters from the stream, starting from a specified point in the byte array.
public Read ( char buffer, int index, int count ) : int
buffer char /// The buffer to read data into. ///
index int /// The index of buffer to start reading into. ///
count int /// The number of characters to read into the buffer. ///
Результат int

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

Reads a series of bytes delimited by the byte encoding of newline for this platform. the newline bytes will not be included in the return data.
public ReadByteLine ( ) : byte[]
Результат byte[]

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

Reads a line from the stack delimited by the newline for this platform. The newline characters will not be included in the stream
public ReadLine ( ) : string
Результат string

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

Initializes a new instance of the RebufferableBinaryReader class. Default encoding of UTF8 will be used.
public RebufferableBinaryReader ( Stream input ) : System
input Stream /// The input stream to read from. ///
Результат System

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

Initializes a new instance of the RebufferableBinaryReader class.
public RebufferableBinaryReader ( Stream input, Encoding encoding ) : System
input Stream /// The input stream to read from. ///
encoding System.Text.Encoding /// The encoding to use for character based operations. ///
Результат System

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

Initializes a new instance of the RebufferableBinaryReader class.
public RebufferableBinaryReader ( Stream input, Encoding encoding, int bufferSize ) : System
input Stream /// The input stream to read from. ///
encoding System.Text.Encoding /// The encoding to use for character based operations. ///
bufferSize int /// The buffer size to use for new buffers. ///
Результат System