Свойство | Тип | Описание | |
---|---|---|---|
Stream | |||
Utf8 |
Метод | Описание | |
---|---|---|
Copy ( long source, long destination, int length ) : void |
Copies a specified number of bytes to a new location
|
|
Dispose ( ) : void |
Releases all the resources used by the BinaryStreamBase object.
|
|
Flush ( ) : void |
When overridden in a derived class, clears all buffers for this stream and causes any buffered data to be written to the underlying device.
|
|
InsertBytes ( int numberOfBytes, int lengthOfValidDataToShift ) : void |
Inserts a certain number of bytes into the stream, shifting valid data to the right. The stream's position remains unchanged. (ie. pointing to the beginning of the newly inserted bytes). Internally this fuction merely acomplishes an Array.Copy(stream,position,stream,position+numberOfBytes,lengthOfValidDataToShift) However, it's much more complicated than this. So this is a pretty useful function. The newly created space is uninitialized. |
|
Read ( byte buffer, int offset, int count ) : int |
When overridden in a derived class, reads a sequence of bytes from the current stream and advances the position within the stream by the number of bytes read.
|
|
Read7BitUInt32 ( ) : uint |
Reads from the underlying stream in little endian format. Advancing the position.
|
|
Read7BitUInt64 ( ) : ulong |
Reads from the underlying stream in little endian format. Advancing the position.
|
|
ReadAll ( byte buffer, int length ) : void |
Reads from the underlying stream in little endian format. Advancing the position.
|
|
ReadAll ( byte buffer, int position, int length ) : void |
Reads all of the provided bytes. Will not return prematurely, but continue to execute a Read command until the entire length has been read.
|
|
ReadBoolean ( ) : bool |
Reads from the underlying stream in little endian format. Advancing the position.
|
|
ReadBytes ( ) : byte[] |
Reads from the underlying stream in little endian format. Advancing the position.
|
|
ReadBytes ( int count ) : byte[] |
Reads from the underlying stream in little endian format. Advancing the position.
|
|
ReadDateTime ( ) : System.DateTime |
Reads from the underlying stream in little endian format. Advancing the position.
|
|
ReadDecimal ( ) : decimal |
Reads from the underlying stream in little endian format. Advancing the position.
|
|
ReadDouble ( ) : double |
Reads from the underlying stream in little endian format. Advancing the position.
|
|
ReadGuid ( ) : System.Guid |
Reads from the underlying stream in little endian format. Advancing the position.
|
|
ReadInt16 ( ) : short |
Reads from the underlying stream in little endian format. Advancing the position.
|
|
ReadInt32 ( ) : int |
Reads from the underlying stream in little endian format. Advancing the position.
|
|
ReadInt64 ( ) : long |
Reads from the underlying stream in little endian format. Advancing the position.
|
|
ReadInt8 ( ) : sbyte |
Reads from the underlying stream in little endian format. Advancing the position.
|
|
ReadSingle ( ) : float |
Reads from the underlying stream in little endian format. Advancing the position.
|
|
ReadString ( ) : string |
Reads from the underlying stream in little endian format. Advancing the position.
|
|
ReadUInt ( int bytes ) : ulong |
Reads from the underlying stream in little endian format. Advancing the position.
|
|
ReadUInt16 ( ) : ushort |
Reads from the underlying stream in little endian format. Advancing the position.
|
|
ReadUInt24 ( ) : uint |
Reads from the underlying stream in little endian format. Advancing the position.
|
|
ReadUInt32 ( ) : uint |
Reads from the underlying stream in little endian format. Advancing the position.
|
|
ReadUInt40 ( ) : ulong |
Reads from the underlying stream in little endian format. Advancing the position.
|
|
ReadUInt48 ( ) : ulong |
Reads from the underlying stream in little endian format. Advancing the position.
|
|
ReadUInt56 ( ) : ulong |
Reads from the underlying stream in little endian format. Advancing the position.
|
|
ReadUInt64 ( ) : ulong |
Reads from the underlying stream in little endian format. Advancing the position.
|
|
ReadUInt8 ( ) : byte |
Reads from the underlying stream in little endian format. Advancing the position.
|
|
RemoveBytes ( int numberOfBytes, int lengthOfValidDataToShift ) : void |
Removes a certain number of bytes from the stream, shifting valid data after this location to the left. The stream's position remains unchanged. (ie. pointing to where the data used to exist). Internally this fuction merely acomplishes an Array.Copy(stream,position+numberOfBytes,stream,position,lengthOfValidDataToShift) However, it's much more complicated than this. So this is a pretty useful function. The space at the end of the copy is uninitialized. |
|
Seek ( long offset, SeekOrigin origin ) : long |
When overridden in a derived class, sets the position within the current stream.
|
|
SetLength ( long value ) : void |
When overridden in a derived class, sets the length of the current stream.
|
|
TryReadBytes ( int maxLength, byte &value ) : bool |
Reads a byte array from the provided stream. If the size of the stream exceedes maxLength value is set to null and this function returns false. This method can be used to limit the byte size returned. Since an untrusted source could claim that the length is int.MaxValue, this prevents allocating 2GB of RAM to store the result. |
|
TryReadString ( int maxLength, string &value ) : bool |
Reads a string from the provided stream. If the size of the string exceedes maxLength value is set to null and this function returns false. This method can be used to limit the byte size returned. Since an untrusted source could claim that the length is int.MaxValue, this prevents allocating 2GB of RAM to store the result. |
|
UpdateLocalBuffer ( bool isWriting ) : void |
Updates the local buffer data.
|
|
Write ( System.DateTime value ) : void |
Writes the specifed value to the underlying stream in little-endian format.
|
|
Write ( System.Guid value ) : void |
Writes the specifed value to the underlying stream in little-endian format.
|
|
Write ( bool value ) : void |
Writes the specifed value to the underlying stream in little-endian format.
|
|
Write ( byte value ) : void |
Writes the specifed value to the underlying stream in little-endian format.
|
|
Write ( byte buffer, int length ) : void |
Writes the specifed buffer to the underlying stream in little-endian format.
|
|
Write ( byte buffer, int offset, int count ) : void |
When overridden in a derived class, writes a sequence of bytes to the current stream and advances the current position within this stream by the number of bytes written.
|
|
Write ( decimal value ) : void |
Writes the specifed value to the underlying stream in little-endian format.
|
|
Write ( double value ) : void |
Writes the specifed value to the underlying stream in little-endian format.
|
|
Write ( float value ) : void |
Writes the specifed value to the underlying stream in little-endian format.
|
|
Write ( int value ) : void |
Writes the specifed value to the underlying stream in little-endian format.
|
|
Write ( long value ) : void |
Writes the specifed value to the underlying stream in little-endian format.
|
|
Write ( sbyte value ) : void |
Writes the specifed value to the underlying stream in little-endian format.
|
|
Write ( short value ) : void |
Writes the specifed value to the underlying stream in little-endian format.
|
|
Write ( string value ) : void |
Writes the specifed value to the underlying stream in little-endian format.
|
|
Write ( uint value ) : void |
Writes the specifed value to the underlying stream in little-endian format.
|
|
Write ( ulong value ) : void |
Writes the specifed value to the underlying stream in little-endian format.
|
|
Write ( ushort value ) : void |
Writes the specifed value to the underlying stream in little-endian format.
|
|
Write7Bit ( uint value ) : void |
Writes the specifed value to the underlying stream in little-endian format.
|
|
Write7Bit ( ulong value ) : void |
Writes the specifed value to the underlying stream in little-endian format.
|
|
WriteUInt ( ulong value, int bytes ) : void |
Writes the specifed value to the underlying stream in little-endian format.
|
|
WriteUInt24 ( uint value ) : void |
Writes the specifed value to the underlying stream in little-endian format.
|
|
WriteUInt40 ( ulong value ) : void |
Writes the specifed value to the underlying stream in little-endian format.
|
|
WriteUInt48 ( ulong value ) : void |
Writes the specifed value to the underlying stream in little-endian format.
|
|
WriteUInt56 ( ulong value ) : void |
Writes the specifed value to the underlying stream in little-endian format.
|
|
WriteWithLength ( byte value ) : void |
Writes the specifed value to the underlying stream in little-endian format.
|
Метод | Описание | |
---|---|---|
BinaryStreamBase ( ) : System |
Creates a BinaryStreamBase
|
|
Dispose ( bool disposing ) : void |
Releases the unmanaged resources used by the BinaryStreamBase object and optionally releases the managed resources.
|
public Copy ( long source, long destination, int length ) : void | ||
source | long | |
destination | long | |
length | int | |
Результат | void |
protected Dispose ( bool disposing ) : void | ||
disposing | bool | true to release both managed and unmanaged resources; false to release only unmanaged resources. |
Результат | void |
public InsertBytes ( int numberOfBytes, int lengthOfValidDataToShift ) : void | ||
numberOfBytes | int | The number of bytes to insert |
lengthOfValidDataToShift | int | The number of bytes that will need to be shifted to perform this insert |
Результат | void |
public abstract Read ( byte buffer, int offset, int count ) : int | ||
buffer | byte | An array of bytes. When this method returns, the buffer contains the specified byte array with the values between |
offset | int | The zero-based byte offset in |
count | int | The maximum number of bytes to be read from the current stream. |
Результат | int |
public ReadAll ( byte buffer, int length ) : void | ||
buffer | byte | the pointer to write the data to |
length | int | the number of bytes to read |
Результат | void |
public ReadAll ( byte buffer, int position, int length ) : void | ||
buffer | byte | |
position | int | |
length | int | |
Результат | void |
public ReadBytes ( int count ) : byte[] | ||
count | int | the number of bytes to read |
Результат | byte[] |
public ReadUInt ( int bytes ) : ulong | ||
bytes | int | the number of bytes in the value |
Результат | ulong |
public RemoveBytes ( int numberOfBytes, int lengthOfValidDataToShift ) : void | ||
numberOfBytes | int | The distance to shift. Positive means shifting to the right (ie. inserting data) /// Negative means shift to the left (ie. deleteing data) |
lengthOfValidDataToShift | int | The number of bytes that will need to be shifted to perform the remove. /// This only includes the data that is valid after the shift is complete, and not the data that will be removed. |
Результат | void |
public Seek ( long offset, SeekOrigin origin ) : long | ||
offset | long | A byte offset relative to the |
origin | SeekOrigin | A value of type |
Результат | long |
public abstract SetLength ( long value ) : void | ||
value | long | The desired length of the current stream in bytes. |
Результат | void |
public TryReadBytes ( int maxLength, byte &value ) : bool | ||
maxLength | int | |
value | byte | |
Результат | bool |
public TryReadString ( int maxLength, string &value ) : bool | ||
maxLength | int | The maximum number of characters in the string. |
value | string | an output |
Результат | bool |
public UpdateLocalBuffer ( bool isWriting ) : void | ||
isWriting | bool | hints to the stream if write access is desired. |
Результат | void |
public Write ( System.DateTime value ) : void | ||
value | System.DateTime | the value to write |
Результат | void |
public Write ( System.Guid value ) : void | ||
value | System.Guid | the value to write |
Результат | void |
public Write ( bool value ) : void | ||
value | bool | the value to write |
Результат | void |
public Write ( byte value ) : void | ||
value | byte | the value to write |
Результат | void |
public Write ( byte buffer, int length ) : void | ||
buffer | byte | the pointer to the first byte |
length | int | the number of bytes to write |
Результат | void |
public abstract Write ( byte buffer, int offset, int count ) : void | ||
buffer | byte | An array of bytes. This method copies |
offset | int | The zero-based byte offset in |
count | int | The number of bytes to be written to the current stream. |
Результат | void |
public Write ( decimal value ) : void | ||
value | decimal | the value to write |
Результат | void |
public Write ( double value ) : void | ||
value | double | the value to write |
Результат | void |
public Write ( float value ) : void | ||
value | float | the value to write |
Результат | void |
public Write ( int value ) : void | ||
value | int | the value to write |
Результат | void |
public Write ( long value ) : void | ||
value | long | the value to write |
Результат | void |
public Write ( sbyte value ) : void | ||
value | sbyte | the value to write |
Результат | void |
public Write ( short value ) : void | ||
value | short | the value to write |
Результат | void |
public Write ( string value ) : void | ||
value | string | the value to write |
Результат | void |
public Write ( uint value ) : void | ||
value | uint | the value to write |
Результат | void |
public Write ( ulong value ) : void | ||
value | ulong | the value to write |
Результат | void |
public Write ( ushort value ) : void | ||
value | ushort | the value to write |
Результат | void |
public Write7Bit ( uint value ) : void | ||
value | uint | the value to write |
Результат | void |
public Write7Bit ( ulong value ) : void | ||
value | ulong | the value to write |
Результат | void |
public WriteUInt ( ulong value, int bytes ) : void | ||
value | ulong | the value to write |
bytes | int | the number of bytes to write. |
Результат | void |
public WriteUInt24 ( uint value ) : void | ||
value | uint | the value to write |
Результат | void |
public WriteUInt40 ( ulong value ) : void | ||
value | ulong | the value to write |
Результат | void |
public WriteUInt48 ( ulong value ) : void | ||
value | ulong | the value to write |
Результат | void |
public WriteUInt56 ( ulong value ) : void | ||
value | ulong | the value to write |
Результат | void |
public WriteWithLength ( byte value ) : void | ||
value | byte | the value to write |
Результат | void |