C# Class DarkMapleLib.Helpers.ArrayWriter

Class to handle writing data to an byte array
Afficher le fichier Open project: enguard/Ecalia

Private Properties

Свойство Type Description
EnsureCapacity void

Méthodes publiques

Méthode Description
ArrayWriter ( int initialBufferSize = 0x50 ) : System

Creates a new instance of a ArrayWriter

SetBool ( bool value, int position ) : void

Sets a bool in the buffer

SetByte ( byte value, int position ) : void

Sets a unsigned byte in the buffer

SetBytes ( byte bytes, int position ) : void

Sets bytes in the buffer

SetInt ( int value, int position ) : void

Sets a signed int in the buffer

SetLong ( long value, int position ) : void

Sets a signed long in the buffer

SetSByte ( sbyte value, int position ) : void

Sets a signed byte in the buffer

SetShort ( short value, int position ) : void

Sets a signed short in the buffer

SetUInt ( uint value, int position ) : void

Sets a unsigned int in the buffer

SetULong ( ulong value, int position ) : void

Sets a unsigned long in the buffer

SetUShort ( ushort value, int position ) : void

Sets a unsigned short in the buffer

ToArray ( bool direct = false ) : byte[]

Creates an byte array of the current ArrayWriter

WriteBool ( bool value ) : void

Writes a bool to the buffer

WriteByte ( byte value ) : void

Writes a unsigned byte to the buffer

WriteBytes ( byte bytes ) : void

Writes bytes to the buffer

WriteInt ( int value ) : void

Writes a signed int to the buffer

WriteLong ( long value ) : void

Writes a signed long to the buffer

WriteMapleString ( string mString ) : void

Write a string as maplestring to the buffer

WriteSByte ( sbyte value ) : void

Writes a signed byte to the buffer

WriteShort ( short value ) : void

Writes a signed short to the buffer

WriteUInt ( uint value ) : void

Writes a unsigned int to the buffer

WriteULong ( ulong value ) : void

Writes a unsigned long to the buffer

WriteUShort ( ushort value ) : void

Writes a unsigned short to the buffer

WriteZeroBytes ( int count ) : void

Writes a number of empty bytes to the buffer

Private Methods

Méthode Description
EnsureCapacity ( int length ) : void

Prevents the buffer being to small

Method Details

ArrayWriter() public méthode

Creates a new instance of a ArrayWriter
public ArrayWriter ( int initialBufferSize = 0x50 ) : System
initialBufferSize int Sets the initial size of the buffer
Résultat System

SetBool() public méthode

Sets a bool in the buffer
public SetBool ( bool value, int position ) : void
value bool
position int
Résultat void

SetByte() public méthode

Sets a unsigned byte in the buffer
public SetByte ( byte value, int position ) : void
value byte
position int
Résultat void

SetBytes() public méthode

Sets bytes in the buffer
public SetBytes ( byte bytes, int position ) : void
bytes byte
position int
Résultat void

SetInt() public méthode

Sets a signed int in the buffer
public SetInt ( int value, int position ) : void
value int
position int
Résultat void

SetLong() public méthode

Sets a signed long in the buffer
public SetLong ( long value, int position ) : void
value long
position int
Résultat void

SetSByte() public méthode

Sets a signed byte in the buffer
public SetSByte ( sbyte value, int position ) : void
value sbyte
position int
Résultat void

SetShort() public méthode

Sets a signed short in the buffer
public SetShort ( short value, int position ) : void
value short
position int
Résultat void

SetUInt() public méthode

Sets a unsigned int in the buffer
public SetUInt ( uint value, int position ) : void
value uint
position int
Résultat void

SetULong() public méthode

Sets a unsigned long in the buffer
public SetULong ( ulong value, int position ) : void
value ulong
position int
Résultat void

SetUShort() public méthode

Sets a unsigned short in the buffer
public SetUShort ( ushort value, int position ) : void
value ushort
position int
Résultat void

ToArray() public méthode

Creates an byte array of the current ArrayWriter
public ToArray ( bool direct = false ) : byte[]
direct bool If true, returns a direct reference of the buffer
Résultat byte[]

WriteBool() public méthode

Writes a bool to the buffer
public WriteBool ( bool value ) : void
value bool
Résultat void

WriteByte() public méthode

Writes a unsigned byte to the buffer
public WriteByte ( byte value ) : void
value byte
Résultat void

WriteBytes() public méthode

Writes bytes to the buffer
public WriteBytes ( byte bytes ) : void
bytes byte
Résultat void

WriteInt() public méthode

Writes a signed int to the buffer
public WriteInt ( int value ) : void
value int
Résultat void

WriteLong() public méthode

Writes a signed long to the buffer
public WriteLong ( long value ) : void
value long
Résultat void

WriteMapleString() public méthode

Write a string as maplestring to the buffer
public WriteMapleString ( string mString ) : void
mString string String to write
Résultat void

WriteSByte() public méthode

Writes a signed byte to the buffer
public WriteSByte ( sbyte value ) : void
value sbyte
Résultat void

WriteShort() public méthode

Writes a signed short to the buffer
public WriteShort ( short value ) : void
value short
Résultat void

WriteUInt() public méthode

Writes a unsigned int to the buffer
public WriteUInt ( uint value ) : void
value uint
Résultat void

WriteULong() public méthode

Writes a unsigned long to the buffer
public WriteULong ( ulong value ) : void
value ulong
Résultat void

WriteUShort() public méthode

Writes a unsigned short to the buffer
public WriteUShort ( ushort value ) : void
value ushort
Résultat void

WriteZeroBytes() public méthode

Writes a number of empty bytes to the buffer
public WriteZeroBytes ( int count ) : void
count int Number of empty (zero) bytes to write
Résultat void