Method | Description | |
---|---|---|
CreateInstance ( ) : PacketWriter | ||
CreateInstance ( int capacity, bool fixedsize ) : PacketWriter | ||
Fill ( ) : void |
Fills the stream from the current position up to (capacity) with 0x00's
|
|
Fill ( int length ) : void |
Writes a number of 0x00 byte values to the underlying stream.
|
|
PacketWriter ( ) : System |
Instantiates a new PacketWriter instance with the default capacity of 4 bytes.
|
|
PacketWriter ( int capacity ) : System |
Instantiates a new PacketWriter instance with a given capacity.
|
|
ReleaseInstance ( PacketWriter pw ) : void | ||
Seek ( long offset, SeekOrigin origin ) : long |
Offsets the current position from an origin.
|
|
ToArray ( ) : byte[] |
Gets the entire stream content as a byte array.
|
|
Write ( bool value ) : void |
Writes a 1-byte boolean value to the underlying stream. False is represented by 0, true by 1.
|
|
Write ( byte value ) : void |
Writes a 1-byte unsigned integer value to the underlying stream.
|
|
Write ( byte buffer, int offset, int size ) : void |
Writes a sequence of bytes to the underlying stream
|
|
Write ( int value ) : void |
Writes a 4-byte Big Endian signed integer value to the underlying stream.
|
|
Write ( sbyte value ) : void |
Writes a 1-byte signed integer value to the underlying stream.
|
|
Write ( short value ) : void |
Writes a 2-byte signed integer value to the underlying stream.
|
|
Write ( uint value ) : void |
Writes a 4-byte Big Endian unsigned integer value to the underlying stream.
|
|
Write ( ushort value ) : void |
Writes a 2-byte unsigned integer value to the underlying stream.
|
|
WriteAsciiFixed ( string value, int size ) : void |
Writes a fixed-length ASCII-encoded string value to the underlying stream. To fit (size), the string content is either truncated or padded with null characters.
|
|
WriteAsciiNull ( string value ) : void |
Writes a dynamic-length ASCII-encoded string value to the underlying stream, followed by a 1-byte null character.
|
|
WriteBigUniFixed ( string value, int size ) : void |
Writes a fixed-length big-endian unicode string value to the underlying stream. To fit (size), the string content is either truncated or padded with null characters.
|
|
WriteBigUniNull ( string value ) : void |
Writes a dynamic-length big-endian unicode string value to the underlying stream, followed by a 2-byte null character.
|
|
WriteLittleUniFixed ( string value, int size ) : void |
Writes a fixed-length little-endian unicode string value to the underlying stream. To fit (size), the string content is either truncated or padded with null characters.
|
|
WriteLittleUniNull ( string value ) : void |
Writes a dynamic-length little-endian unicode string value to the underlying stream, followed by a 2-byte null character.
|
public static CreateInstance ( ) : PacketWriter | ||
return | PacketWriter |
public static CreateInstance ( int capacity, bool fixedsize ) : PacketWriter | ||
capacity | int | |
fixedsize | bool | |
return | PacketWriter |
public PacketWriter ( int capacity ) : System | ||
capacity | int | Initial capacity for the internal stream. |
return | System |
public static ReleaseInstance ( PacketWriter pw ) : void | ||
pw | PacketWriter | |
return | void |
public Seek ( long offset, SeekOrigin origin ) : long | ||
offset | long | |
origin | SeekOrigin | |
return | long |
public Write ( byte buffer, int offset, int size ) : void | ||
buffer | byte | |
offset | int | |
size | int | |
return | void |
public WriteAsciiFixed ( string value, int size ) : void | ||
value | string | |
size | int | |
return | void |
public WriteAsciiNull ( string value ) : void | ||
value | string | |
return | void |
public WriteBigUniFixed ( string value, int size ) : void | ||
value | string | |
size | int | |
return | void |
public WriteBigUniNull ( string value ) : void | ||
value | string | |
return | void |
public WriteLittleUniFixed ( string value, int size ) : void | ||
value | string | |
size | int | |
return | void |
public WriteLittleUniNull ( string value ) : void | ||
value | string | |
return | void |