Method | Description | |
---|---|---|
Fill ( byte buffer, int offset, int count ) : void |
Reads exactly count bytes from the buffer. If count > Count - Index the callback specified during construction is called as necessary. |
|
Fill ( int count ) : void |
Ensures that count <= (Count - Index). Reads bytes into the buffer by repeatedly calling the callback specified during construction until at least count bytes are available. |
|
Read ( ) : bool |
Reads bytes into the buffer by calling the callback specified during construction exactly once. After each call to this method, Count contains the number of bytes in the buffer and Index equals 0. This function is usually called when Index equals Count, that is, when the client has processed all bytes in the buffer (the whole buffer is filled in this case). If it is called earlier (when Index < Count) then the remaining bytes at the end of the buffer are first copied to the start of the buffer and the now empty part of the buffer is filled by calling the callback. |
|
Read ( byte buffer, int offset, int count ) : int |
Reads bytes from the buffer by calling the callback specified during construction at most once. The callback specified during construction is only called if Index equals Count. |
|
ReadBuffer ( ReadCallback read, int bufferSize ) : System |
Initializes a new instance of the ReadBuffer class.
|
|
ReadUtf8 ( int count ) : string |
Reads an UTF-8-encoded string from the buffer. First calls Fill(int) to read all the necessary bytes into the buffer. |
Method | Description | |
---|---|---|
CheckAndAddToCount ( int readCount ) : void | ||
Compact ( ) : void | ||
EnsureSpace ( int count ) : void | ||
FillAsync ( byte buffer, int offset, int count, |
||
FillAsync ( int count, |
||
FillCore ( int count ) : void | ||
FillCoreAsync ( int count, |
||
ReadAsync ( |
||
ReadAsync ( byte buffer, int offset, int count, |
||
ReadBuffer ( ReadAsyncCallback readAsync, int bufferSize ) : System | ||
ReadFromBuffer ( byte buffer, int offset, int count ) : int |
public Fill ( byte buffer, int offset, int count ) : void | ||
buffer | byte | |
offset | int | |
count | int | |
return | void |
public Fill ( int count ) : void | ||
count | int | The minimum number of bytes that will be available when this method returns. |
return | void |
public Read ( byte buffer, int offset, int count ) : int | ||
buffer | byte | |
offset | int | |
count | int | |
return | int |
public ReadBuffer ( ReadCallback read, int bufferSize ) : System | ||
read | ReadCallback | The method that is called when the buffer needs to be filled. |
bufferSize | int | The size of the buffer in bytes. |
return | System |
public ReadUtf8 ( int count ) : string | ||
count | int | The number of bytes the UTF-8 representation occupies in the buffer. |
return | string |