BinaryReader class

The BinaryReader is a seekable reader of ByteData, where each read updates the pointer to the next byte.

Constructors

BinaryReader({required ByteData byteData, Endian endian = Endian.little})
Initialise the BinaryReader with data and endian, so the reader knows how to interpret the bytes.

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

getASCIIZ() String
Read until a null terminator, return the string and updates the pointer.
getByte() int
Read 1 byte and updates the pointer.
getDouble() double
Read 8 bytes as double and updates the pointer.
getLong() int
Read 4 bytes as integer and updates the pointer.
getShort() int
Read 2 bytes as integer and updates the pointer.
getULong() int
Read 4 bytes as positive integer and updates the pointer.
getUShort() int
Read 2 bytes as positive integer and updates the pointer.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
seek(int offset, SeekOrigin origin) → void
Reset the internal pointer to a specific offset depending on the SeekOrigin.
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited