new(b:Bytes, ?pos:Int, ?len:Int)
read onlywrite onlylength:Int
The length of the stream in bytes.
write onlyposition:Int
The current position in the stream in bytes.
read onlybigEndian:Bool
Endianness (word byte order) used when reading numbers.
If true, big-endian is used, otherwise little-endian is used.
true
little-endian
read(nbytes:Int):Bytes
Read and return nbytes bytes.
nbytes
readFullBytes(s:Bytes, pos:Int, len:Int):Void
Read len bytes and write them into s to the position specified by pos.
len
s
pos
Unlike readBytes, this method tries to read the exact len amount of bytes.
readBytes
readInt32():Int
Read a 32-bit signed integer.
Endianness is specified by the bigEndian property.
bigEndian
readString(len:Int, ?encoding:Encoding):String
Read and len bytes as a string.