write

public static void write(NBTCompound data, OutputStream outputStream)

Serialize, gzip, and write the provided NBT data and write it to an output stream

See also

Throws

If the NBT data could not be serialized or the output stream could not be written to


public static void write(    NBTCompound data,     OutputStream outputStream,     boolean useCompression)

Serialize the provided NBT data and write it to an output stream

If control over the root tag's name is needed, use write instead.

See also

Parameters

data

NBT compound to serialize

outputStream

Output stream to write the serialized NBT to

useCompression

If true, the serialized data will be gzipped

Throws

If the NBT data could not be serialized or the output stream could not be written to


public static void write(    NBTCompound data,     OutputStream outputStream,     String rootCompoundName,     boolean useCompression)

Serialize the provided NBT data and write it to an output stream

If the root compound's name doesn't matter, use write instead.

See also

Parameters

data

NBT compound to serialize

outputStream

Output stream to write the serialized NBT to

rootCompoundName

The name of the NBT compound that holds all other NBT data

useCompression

If true, the serialized data will be gzipped

Throws

If the NBT data could not be serialized or the output stream could not be written to