C# Class OpenStory.Common.IO.PacketBuilder

Represents a class for constructing game packets.
This class exclusively uses little-endian byte order.
Inheritance: IPacketBuilder, IDisposable
Mostra file Open project: shoftee/OpenStory Class Usage Examples

Public Methods

Method Description
Dispose ( ) : void Calling instance methods after calling this will cause them to throw an ObjectDisposedException.
PacketBuilder ( ) : System

Initializes a new instance of the PacketBuilder class with the default capacity.

ToByteArray ( ) : byte[]

Gets a copy of the internal byte buffer of the PacketBuilder.

WriteBoolean ( bool boolean ) : void
WriteByte ( byte number ) : void
WriteByte ( int number ) : void
WriteBytes ( byte bytes ) : void
WriteInt16 ( int number ) : void
WriteInt16 ( short number ) : void
WriteInt16 ( uint number ) : void
WriteInt16 ( ushort number ) : void
WriteInt32 ( int number ) : void
WriteInt32 ( uint number ) : void
WriteInt64 ( long number ) : void
WriteInt64 ( ulong number ) : void
WriteLengthString ( string @string ) : void
WritePaddedString ( string @string, int paddingLength ) : void
WriteZeroes ( int count ) : void

Private Methods

Method Description
ThrowIfDisposed ( ) : void

Throws a new ObjectDisposedException if the current object is disposed.

WriteDirect ( byte bytes ) : void

Method Details

Dispose() public method

Calling instance methods after calling this will cause them to throw an ObjectDisposedException.
public Dispose ( ) : void
return void

PacketBuilder() public method

Initializes a new instance of the PacketBuilder class with the default capacity.
public PacketBuilder ( ) : System
return System

ToByteArray() public method

Gets a copy of the internal byte buffer of the PacketBuilder.
public ToByteArray ( ) : byte[]
return byte[]

WriteBoolean() public method

public WriteBoolean ( bool boolean ) : void
boolean bool
return void

WriteByte() public method

public WriteByte ( byte number ) : void
number byte
return void

WriteByte() public method

public WriteByte ( int number ) : void
number int
return void

WriteBytes() public method

public WriteBytes ( byte bytes ) : void
bytes byte
return void

WriteInt16() public method

public WriteInt16 ( int number ) : void
number int
return void

WriteInt16() public method

public WriteInt16 ( short number ) : void
number short
return void

WriteInt16() public method

public WriteInt16 ( uint number ) : void
number uint
return void

WriteInt16() public method

public WriteInt16 ( ushort number ) : void
number ushort
return void

WriteInt32() public method

public WriteInt32 ( int number ) : void
number int
return void

WriteInt32() public method

public WriteInt32 ( uint number ) : void
number uint
return void

WriteInt64() public method

public WriteInt64 ( long number ) : void
number long
return void

WriteInt64() public method

public WriteInt64 ( ulong number ) : void
number ulong
return void

WriteLengthString() public method

public WriteLengthString ( string @string ) : void
@string string
return void

WritePaddedString() public method

public WritePaddedString ( string @string, int paddingLength ) : void
@string string
paddingLength int
return void

WriteZeroes() public method

public WriteZeroes ( int count ) : void
count int
return void