C# 클래스 HttpServer.Tools.BufferReader

Reads strings from a byte array.
상속: ITextReader
파일 보기 프로젝트 열기: NyxStudios/HttpServer 1 사용 예제들

공개 메소드들

메소드 설명
Assign ( object buffer ) : void

Assign a new buffer

Assign ( object buffer, int offset, int count ) : void

Assign a new buffer

BufferReader ( ) : System

Initializes a new instance of the BufferReader class.

BufferReader ( Encoding encoding ) : System

Initializes a new instance of the BufferReader class.

BufferReader ( byte buffer, Encoding encoding ) : System

Initializes a new instance of the BufferReader class.

Consume ( ) : void

Consume current character.

ConsumeWhiteSpaces ( ) : void

Consumes horizontal white spaces (space and tab).

ConsumeWhiteSpaces ( char extraCharacter ) : void

Consume horizontal white spaces and the specified character.

Contains ( char ch ) : bool

Checks if one of the remaining bytes are a specified character.

Read ( ) : char

Read a character.

ReadLine ( ) : string

Get a text line.

Will merge multi line headers.

ReadQuotedString ( ) : string

Read quoted string

ReadToEnd ( ) : string

Read until end of string, or to one of the delimiters are found.

Will not consume the delimiter.

ReadToEnd ( char delimiter ) : string

Read to end of buffer, or until specified delimiter is found.

Will not consume the delimiter.

ReadToEnd ( string delimiters ) : string

Read until end of string, or to one of the delimiters are found.

Will not consume the delimiter.

ReadUntil ( char delimiter ) : string

Will read until specified delimiter is found.

Will trim away spaces and tabs from the end.

ReadUntil ( string delimiters ) : string

Read until one of the delimiters are found.

Will not consume the delimiter.

ReadWord ( ) : string

Read until a horizontal white space occurs.

비공개 메소드들

메소드 설명
GetString ( int startIndex, int endIndex ) : string
GetString ( int startIndex, int endIndex, bool trimEnd ) : string

메소드 상세

Assign() 공개 메소드

Assign a new buffer
Buffer needs to be a byte array
public Assign ( object buffer ) : void
buffer object Buffer to process
리턴 void

Assign() 공개 메소드

Assign a new buffer
Buffer needs to be a byte array
public Assign ( object buffer, int offset, int count ) : void
buffer object Buffer to process.
offset int Where to start process buffer
count int Buffer length
리턴 void

BufferReader() 공개 메소드

Initializes a new instance of the BufferReader class.
public BufferReader ( ) : System
리턴 System

BufferReader() 공개 메소드

Initializes a new instance of the BufferReader class.
public BufferReader ( Encoding encoding ) : System
encoding System.Text.Encoding Encoding to use when converting byte array to strings.
리턴 System

BufferReader() 공개 메소드

Initializes a new instance of the BufferReader class.
public BufferReader ( byte buffer, Encoding encoding ) : System
buffer byte Buffer to read from.
encoding System.Text.Encoding Encoding to use when converting byte array to strings.
리턴 System

Consume() 공개 메소드

Consume current character.
public Consume ( ) : void
리턴 void

ConsumeWhiteSpaces() 공개 메소드

Consumes horizontal white spaces (space and tab).
public ConsumeWhiteSpaces ( ) : void
리턴 void

ConsumeWhiteSpaces() 공개 메소드

Consume horizontal white spaces and the specified character.
public ConsumeWhiteSpaces ( char extraCharacter ) : void
extraCharacter char Extra character to consume
리턴 void

Contains() 공개 메소드

Checks if one of the remaining bytes are a specified character.
public Contains ( char ch ) : bool
ch char Character to find.
리턴 bool

Read() 공개 메소드

Read a character.
public Read ( ) : char
리턴 char

ReadLine() 공개 메소드

Get a text line.
Will merge multi line headers.
public ReadLine ( ) : string
리턴 string

ReadQuotedString() 공개 메소드

Read quoted string
public ReadQuotedString ( ) : string
리턴 string

ReadToEnd() 공개 메소드

Read until end of string, or to one of the delimiters are found.
Will not consume the delimiter.
public ReadToEnd ( ) : string
리턴 string

ReadToEnd() 공개 메소드

Read to end of buffer, or until specified delimiter is found.
Will not consume the delimiter.
InvalidOperationException.
public ReadToEnd ( char delimiter ) : string
delimiter char Delimiter to find.
리턴 string

ReadToEnd() 공개 메소드

Read until end of string, or to one of the delimiters are found.
Will not consume the delimiter.
InvalidOperationException.
public ReadToEnd ( string delimiters ) : string
delimiters string characters to stop at
리턴 string

ReadUntil() 공개 메소드

Will read until specified delimiter is found.
Will trim away spaces and tabs from the end.
InvalidOperationException.
public ReadUntil ( char delimiter ) : string
delimiter char Character to stop at.
리턴 string

ReadUntil() 공개 메소드

Read until one of the delimiters are found.
Will not consume the delimiter.
InvalidOperationException.
public ReadUntil ( string delimiters ) : string
delimiters string characters to stop at
리턴 string

ReadWord() 공개 메소드

Read until a horizontal white space occurs.
public ReadWord ( ) : string
리턴 string