C# Class 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.
Inheritance: IDisposable
Afficher le fichier Open project: Vodurden/Http-Multipart-Data-Parser Class Usage Examples

Méthodes publiques

Méthode Description
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.

Private Methods

Méthode Description
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.

Method Details

Buffer() public méthode

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. ///
Résultat void

Buffer() public méthode

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. ///
Résultat void

Read() public méthode

Reads a single byte as an integer from the stream. Returns -1 if no data is left to read.
public Read ( ) : int
Résultat int

Read() public méthode

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. ///
Résultat int

Read() public méthode

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. ///
Résultat int

ReadByteLine() public méthode

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[]
Résultat byte[]

ReadLine() public méthode

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
Résultat string

RebufferableBinaryReader() public méthode

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. ///
Résultat System

RebufferableBinaryReader() public méthode

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. ///
Résultat System

RebufferableBinaryReader() public méthode

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. ///
Résultat System