C# Класс DarkMapleLib.Helpers.ArrayWriter

Class to handle writing data to an byte array
Показать файл Открыть проект

Private Properties

Свойство Тип Описание
EnsureCapacity void

Открытые методы

Метод Описание
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

Приватные методы

Метод Описание
EnsureCapacity ( int length ) : void

Prevents the buffer being to small

Описание методов

ArrayWriter() публичный Метод

Creates a new instance of a ArrayWriter
public ArrayWriter ( int initialBufferSize = 0x50 ) : System
initialBufferSize int Sets the initial size of the buffer
Результат System

SetBool() публичный Метод

Sets a bool in the buffer
public SetBool ( bool value, int position ) : void
value bool
position int
Результат void

SetByte() публичный Метод

Sets a unsigned byte in the buffer
public SetByte ( byte value, int position ) : void
value byte
position int
Результат void

SetBytes() публичный Метод

Sets bytes in the buffer
public SetBytes ( byte bytes, int position ) : void
bytes byte
position int
Результат void

SetInt() публичный Метод

Sets a signed int in the buffer
public SetInt ( int value, int position ) : void
value int
position int
Результат void

SetLong() публичный Метод

Sets a signed long in the buffer
public SetLong ( long value, int position ) : void
value long
position int
Результат void

SetSByte() публичный Метод

Sets a signed byte in the buffer
public SetSByte ( sbyte value, int position ) : void
value sbyte
position int
Результат void

SetShort() публичный Метод

Sets a signed short in the buffer
public SetShort ( short value, int position ) : void
value short
position int
Результат void

SetUInt() публичный Метод

Sets a unsigned int in the buffer
public SetUInt ( uint value, int position ) : void
value uint
position int
Результат void

SetULong() публичный Метод

Sets a unsigned long in the buffer
public SetULong ( ulong value, int position ) : void
value ulong
position int
Результат void

SetUShort() публичный Метод

Sets a unsigned short in the buffer
public SetUShort ( ushort value, int position ) : void
value ushort
position int
Результат void

ToArray() публичный Метод

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
Результат byte[]

WriteBool() публичный Метод

Writes a bool to the buffer
public WriteBool ( bool value ) : void
value bool
Результат void

WriteByte() публичный Метод

Writes a unsigned byte to the buffer
public WriteByte ( byte value ) : void
value byte
Результат void

WriteBytes() публичный Метод

Writes bytes to the buffer
public WriteBytes ( byte bytes ) : void
bytes byte
Результат void

WriteInt() публичный Метод

Writes a signed int to the buffer
public WriteInt ( int value ) : void
value int
Результат void

WriteLong() публичный Метод

Writes a signed long to the buffer
public WriteLong ( long value ) : void
value long
Результат void

WriteMapleString() публичный Метод

Write a string as maplestring to the buffer
public WriteMapleString ( string mString ) : void
mString string String to write
Результат void

WriteSByte() публичный Метод

Writes a signed byte to the buffer
public WriteSByte ( sbyte value ) : void
value sbyte
Результат void

WriteShort() публичный Метод

Writes a signed short to the buffer
public WriteShort ( short value ) : void
value short
Результат void

WriteUInt() публичный Метод

Writes a unsigned int to the buffer
public WriteUInt ( uint value ) : void
value uint
Результат void

WriteULong() публичный Метод

Writes a unsigned long to the buffer
public WriteULong ( ulong value ) : void
value ulong
Результат void

WriteUShort() публичный Метод

Writes a unsigned short to the buffer
public WriteUShort ( ushort value ) : void
value ushort
Результат void

WriteZeroBytes() публичный Метод

Writes a number of empty bytes to the buffer
public WriteZeroBytes ( int count ) : void
count int Number of empty (zero) bytes to write
Результат void