NbtReader class Null safety

Constructors

NbtReader(Uint8List list)
NbtReader.fromFile(String path)
Reads the file at path in bytes and constructs a new reader with that data. This method only works on native platforms, so every platform that includes support for 'dart:io'. [...]
factory

Properties

data Uint8List?
List of bytes to read.
read / write, inherited
hashCode int
The hash code for this object. [...]
read-only, inherited
nbtCompression NbtCompression
read / write
readByteData ByteData?
_data represented as a ByteData to ease with the reading of various integers and floats.
read / write, inherited
readPosition int
The current read position inside of _byteData;
read / write, inherited
root NbtCompound<NbtTag>?
read / write
runtimeType Type
A representation of the runtime type of the object.
read-only, inherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed. [...]
inherited
read() NbtCompound<NbtTag>
Reads the NBT data from the byte list. Throws NbtFileReadException if an issue occured.
readByte({bool signed = false}) int
Reads a single byte at readPosition.
inherited
readDouble({bool signed = false}) double
Reads a 8 byte double starting at readPosition.
inherited
readFloat({bool signed = false}) double
Reads a 4 byte float starting at readPosition.
inherited
readInt({bool signed = false}) int
Reads a 4 byte integer starting at readPosition.
inherited
readLong({bool signed = false, Endian endian = Endian.big}) int
Reads a 8 byte integer starting at readPosition.
inherited
readShort({bool signed = false}) int
Reads a 2 byte short starting at readPosition.
inherited
readString() String
Reads a string at readPosition. It will first read a 2 byte short for the length, then reads length-amount of bytes and decodes them as UTF-8.
inherited
readVarLong({bool signed = false}) Pair<int, int>
Reads a 8 byte variable length long starting at readPosition. The format of this long will be as to LEB128, or better what Minecraft uses. Returns a Pair, in which the first integer is the read value and the second the length of the var-integer in bytes.
inherited
reset(Uint8List list) → void
inherited
toString() String
A string representation of this object. [...]
inherited

Operators

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