C# 클래스 HttpMultipartParser.BinaryStreamStack

Provides character based and byte based stream-like read operations over multiple streams and provides methods to add data to the front of the buffer.
파일 보기 프로젝트 열기: Vodurden/Http-Multipart-Data-Parser 1 사용 예제들

공개 메소드들

메소드 설명
BinaryStreamStack ( ) : System.Collections.Generic

Initializes a new instance of the BinaryStreamStack class with the default encoding of UTF8.

BinaryStreamStack ( Encoding encoding ) : System.Collections.Generic

Initializes a new instance of the BinaryStreamStack class.

HasData ( ) : bool

Returns true if there is any data left to read.

Peek ( ) : BinaryReader

Returns the reader on the top of the stack but does not remove it.

Pop ( ) : BinaryReader

Returns the reader on the top of the stack and removes it

Push ( byte data ) : void

Pushes data to the front of the stack. The most recently pushed data will be read first.

Read ( ) : int

Reads a single byte as an integer from the stack. 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 stack, 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 stack, starting from a specified point in the byte array.

ReadByteLine ( ) : byte[]

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

ReadByteLine ( bool &hitStreamEnd ) : byte[]

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

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

ReadLine ( bool &hitStreamEnd ) : string

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

비공개 메소드들

메소드 설명
NextStream ( ) : BinaryReader

Removes the current reader from the stack and ensures it is correctly destroyed and then returns the next available reader. If no reader is available this method returns null.

메소드 상세

BinaryStreamStack() 공개 메소드

Initializes a new instance of the BinaryStreamStack class with the default encoding of UTF8.
public BinaryStreamStack ( ) : System.Collections.Generic
리턴 System.Collections.Generic

BinaryStreamStack() 공개 메소드

Initializes a new instance of the BinaryStreamStack class.
public BinaryStreamStack ( Encoding encoding ) : System.Collections.Generic
encoding System.Text.Encoding /// The encoding to use for character based operations. ///
리턴 System.Collections.Generic

HasData() 공개 메소드

Returns true if there is any data left to read.
public HasData ( ) : bool
리턴 bool

Peek() 공개 메소드

Returns the reader on the top of the stack but does not remove it.
public Peek ( ) : BinaryReader
리턴 System.IO.BinaryReader

Pop() 공개 메소드

Returns the reader on the top of the stack and removes it
public Pop ( ) : BinaryReader
리턴 System.IO.BinaryReader

Push() 공개 메소드

Pushes data to the front of the stack. The most recently pushed data will be read first.
public Push ( byte data ) : void
data byte /// The data to add to the stack. ///
리턴 void

Read() 공개 메소드

Reads a single byte as an integer from the stack. Returns -1 if no data is left to read.
public Read ( ) : int
리턴 int

Read() 공개 메소드

Reads the specified number of bytes from the stack, 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 stack, 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 the specified number of characters from the stack, starting from a specified point in the byte array.
public ReadByteLine ( ) : byte[]
리턴 byte[]

ReadByteLine() 공개 메소드

Reads a line from the stack delimited by the newline for this platform. The newline characters will not be included in the stream
public ReadByteLine ( bool &hitStreamEnd ) : byte[]
hitStreamEnd bool /// This will be set to true if we did not end on a newline but instead found the end of /// our data. ///
리턴 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

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 ( bool &hitStreamEnd ) : string
hitStreamEnd bool /// This will be set to true if we did not end on a newline but instead found the end of /// our data. ///
리턴 string