NbtWriter class Null safety

A byte writer used to serialize NBT data into binary files.

Constructors

NbtWriter({NbtCompression nbtCompression = NbtCompression.none})
Create a new NbtWriter.

Properties

bytesBuilder BytesBuilder
read / write, inherited
getBytes Uint8List
Flush and re-allocate new bytes, while saving the old bytes and returning them.
read-only, inherited
hashCode int
The hash code for this object. [...]
read-only, inherited
nbtCompression NbtCompression
read / write
runtimeType Type
A representation of the runtime type of the object.
read-only, inherited
writeByteData ByteData
read / write, inherited
writePosition int
read / write, inherited

Methods

allocate() → void
Allocate a new ByteData with 1Megabyte of data.
inherited
flush(int offset) → void
Flush the data inside of _curByteData into the _bytesBuilder and allocate a new 1MB of data to _curByteData.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed. [...]
inherited
toString() String
A string representation of this object. [...]
inherited
write(NbtCompound<NbtTag> data) List<int>
Write the given data compound into a list of bytes. See writeFile on how to quickly write to a file.
writeByte(int value, {bool signed = false}) → void
Write a single byte.
inherited
writeBytes(List<int> bytes) → void
inherited
writeDouble(double value, {Endian endian = Endian.big}) → void
Write a single 8 byte double precision floating point number.
inherited
writeFile(String path, NbtCompound<NbtTag> data) Future<void>
Writes the given data compound to the file located at path. This method only works on native platforms, so every platform that includes support for 'dart:io'. [...]
writeFloat(double value, {Endian endian = Endian.big}) → void
Write a single 4 byte single precision floating point number.
inherited
writeInt(int value, {bool signed = false, Endian endian = Endian.big}) → void
Write a single 4 byte integer.
inherited
writeLong(int value, {bool signed = false, Endian endian = Endian.big}) → void
Write a single 8 byte long.
inherited
writeShort(int value, {bool signed = false, Endian endian = Endian.big}) → void
Write a single 2 byte short.
inherited
writeString(String? value) → void
Write a modified UTF-8 String. This includes writing its length as a single short integer.
inherited
writeVarLong(int value, {bool signed = false}) → void
Write a single 8 byte variable length long.
inherited

Operators

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