Method | Description | |
---|---|---|
Close ( ) : void |
Closes the writer, including the underlying stream.
|
|
Dispose ( ) : void |
Disposes of the underlying stream.
|
|
EndianBinaryWriter ( |
Constructs a new binary writer with the given bit converter, writing to the given stream, using UTF-8 encoding.
|
|
EndianBinaryWriter ( |
Constructs a new binary writer with the given bit converter, writing to the given stream, using the given encoding.
|
|
Flush ( ) : void |
Flushes the underlying stream.
|
|
Seek ( int offset, SeekOrigin origin ) : void |
Seeks within the stream.
|
|
Write ( bool value ) : void |
Writes a boolean value to the stream. 1 byte is written.
|
|
Write ( byte value ) : void |
Writes a signed byte to the stream.
|
|
Write ( byte value, int offset, int count ) : void |
Writes a portion of an array of bytes to the stream.
|
|
Write ( char value ) : void |
Writes a single character to the stream, using the encoding for this writer.
|
|
Write ( decimal value ) : void |
Writes a decimal value to the stream, using the bit converter for this writer. 16 bytes are written.
|
|
Write ( double value ) : void |
Writes a double-precision floating-point value to the stream, using the bit converter for this writer. 8 bytes are written.
|
|
Write ( float value ) : void |
Writes a single-precision floating-point value to the stream, using the bit converter for this writer. 4 bytes are written.
|
|
Write ( int value ) : void |
Writes a 32-bit signed integer to the stream, using the bit converter for this writer. 4 bytes are written.
|
|
Write ( long value ) : void |
Writes a 64-bit signed integer to the stream, using the bit converter for this writer. 8 bytes are written.
|
|
Write ( sbyte value ) : void |
Writes an unsigned byte to the stream.
|
|
Write ( short value ) : void |
Writes a 16-bit signed integer to the stream, using the bit converter for this writer. 2 bytes are written.
|
|
Write ( string value ) : void |
Writes a string to the stream, using the encoding for this writer.
|
|
Write ( uint value ) : void |
Writes a 32-bit unsigned integer to the stream, using the bit converter for this writer. 4 bytes are written.
|
|
Write ( ulong value ) : void |
Writes a 64-bit unsigned integer to the stream, using the bit converter for this writer. 8 bytes are written.
|
|
Write ( ushort value ) : void |
Writes a 16-bit unsigned integer to the stream, using the bit converter for this writer. 2 bytes are written.
|
|
Write7BitEncodedInt ( int value ) : void |
Writes a 7-bit encoded integer from the stream. This is stored with the least significant information first, with 7 bits of information per byte of value, and the top bit as a continuation flag.
|
Method | Description | |
---|---|---|
CheckDisposed ( ) : void |
Checks whether or not the writer has been disposed, throwing an exception if so.
|
|
WriteInternal ( byte bytes, int length ) : void |
Writes the specified number of bytes from the start of the given byte array, after checking whether or not the writer has been disposed.
|
public EndianBinaryWriter ( |
||
bitConverter | Converter to use when writing data | |
stream | Stream | Stream to write data to |
return | System |
public EndianBinaryWriter ( |
||
bitConverter | Converter to use when writing data | |
stream | Stream | Stream to write data to |
encoding | Encoding to use when writing character data | |
return | System |
public Seek ( int offset, SeekOrigin origin ) : void | ||
offset | int | Offset to seek to. |
origin | SeekOrigin | Origin of seek operation. |
return | void |
public Write ( byte value, int offset, int count ) : void | ||
value | byte | An array containing the bytes to write |
offset | int | The index of the first byte to write within the array |
count | int | The number of bytes to write |
return | void |
public Write ( decimal value ) : void | ||
value | decimal | The value to write |
return | void |
public Write ( double value ) : void | ||
value | double | The value to write |
return | void |
public Write ( float value ) : void | ||
value | float | The value to write |
return | void |
public Write ( sbyte value ) : void | ||
value | sbyte | The value to write |
return | void |
public Write ( short value ) : void | ||
value | short | The value to write |
return | void |
public Write ( string value ) : void | ||
value | string | The value to write. Must not be null. |
return | void |
public Write ( ulong value ) : void | ||
value | ulong | The value to write |
return | void |
public Write ( ushort value ) : void | ||
value | ushort | The value to write |
return | void |
public Write7BitEncodedInt ( int value ) : void | ||
value | int | The 7-bit encoded integer to write to the stream |
return | void |