ByteStream

Class that allows simple reading and writing of high level types such as integers and strings to/from bytes.

Members

Functions

allocRequest
void allocRequest(ulong size)

Request "size" amount of bytes to be added to the buffer.

clear
void clear()
Undocumented in source. Be warned that the author may not have intended to support it.
getBuffer
byte[] getBuffer()
Undocumented in source. Be warned that the author may not have intended to support it.
getEndianess
Endian getEndianess()
Undocumented in source. Be warned that the author may not have intended to support it.
getPosition
uint getPosition()
Undocumented in source. Be warned that the author may not have intended to support it.
getRemainingLength
uint getRemainingLength()
Undocumented in source. Be warned that the author may not have intended to support it.
getSize
uint getSize()
Undocumented in source. Be warned that the author may not have intended to support it.
read
byte[] read(int len)

Read "len" amount of bytes. The bytes returned have been DUPLICATED, to exactly read use readExact();

readByte
byte readByte()
Undocumented in source. Be warned that the author may not have intended to support it.
readExact
byte[] readExact(int len)
Undocumented in source. Be warned that the author may not have intended to support it.
readInt
int readInt()
Undocumented in source. Be warned that the author may not have intended to support it.
readLong
long readLong()
Undocumented in source. Be warned that the author may not have intended to support it.
readShort
short readShort()
Undocumented in source. Be warned that the author may not have intended to support it.
readStrUTF8
string readStrUTF8()
Undocumented in source. Be warned that the author may not have intended to support it.
readSysAddress
void readSysAddress(string ip, ushort port)
Undocumented in source. Be warned that the author may not have intended to support it.
readU
ubyte[] readU(int len)

Read "len amount of bytes unsigned. The bytes returned have been DUPLICATED.

readUByte
ubyte readUByte()
Undocumented in source. Be warned that the author may not have intended to support it.
readUInt
uint readUInt()
Undocumented in source. Be warned that the author may not have intended to support it.
readUInt24_LE
uint readUInt24_LE()
Undocumented in source. Be warned that the author may not have intended to support it.
readULong
ulong readULong()
Undocumented in source. Be warned that the author may not have intended to support it.
readUShort
ushort readUShort()
Undocumented in source. Be warned that the author may not have intended to support it.
setEndianness
void setEndianness(Endian endianess)
Undocumented in source. Be warned that the author may not have intended to support it.
setPosition
void setPosition(uint position)
Undocumented in source. Be warned that the author may not have intended to support it.
skip
void skip(uint bytes)

Skip "bytes" amount of bytes. The buffer's position will increment by that amount.

trimTo
void trimTo(uint bytes)
Undocumented in source. Be warned that the author may not have intended to support it.
write
void write(byte[] data)

Write "data" to the buffer

writeByte
void writeByte(byte b)
Undocumented in source. Be warned that the author may not have intended to support it.
writeInt
void writeInt(int i)
Undocumented in source. Be warned that the author may not have intended to support it.
writeLong
void writeLong(long l)
Undocumented in source. Be warned that the author may not have intended to support it.
writeShort
void writeShort(short s)
Undocumented in source. Be warned that the author may not have intended to support it.
writeStrUTF8
void writeStrUTF8(string s)
Undocumented in source. Be warned that the author may not have intended to support it.
writeSysAddress
void writeSysAddress(string ip, ushort port, ubyte version_)
Undocumented in source. Be warned that the author may not have intended to support it.
writeU
void writeU(ubyte[] data)
Undocumented in source. Be warned that the author may not have intended to support it.
writeUByte
void writeUByte(ubyte b)
Undocumented in source. Be warned that the author may not have intended to support it.
writeUInt
void writeUInt(uint i)
Undocumented in source. Be warned that the author may not have intended to support it.
writeUInt24_LE
void writeUInt24_LE(uint i24)
Undocumented in source. Be warned that the author may not have intended to support it.
writeULong
void writeULong(ulong l)
Undocumented in source. Be warned that the author may not have intended to support it.
writeUShort
void writeUShort(ushort s)
Undocumented in source. Be warned that the author may not have intended to support it.

Static functions

alloc
ByteStream alloc(uint size, Endian endianess)
Undocumented in source. Be warned that the author may not have intended to support it.
allocDyn
ByteStream allocDyn(Endian endianness)
Undocumented in source. Be warned that the author may not have intended to support it.
wrap
ByteStream wrap(byte[] data, Endian endianess)
Undocumented in source. Be warned that the author may not have intended to support it.

Meta

Authors

jython234