writeToFile

public static void writeToFile(NBTCompound data, File file)

Serialize, gzip, and write to file the provided NBT data

See also

Throws

If the NBT data could not be serialized or the file could not be written to


public static void writeToFile(    NBTCompound data,     File file,     boolean useCompression)

Serialize the provided NBT data and write it to a file

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

See also

Parameters

data

NBT compound to serialize

file

File to write the data to

useCompression

If true, the serialized data will be gzipped before being written to the file

Throws

If the NBT data could not be serialized or the file could not be written to


public static void writeToFile(    NBTCompound data,     File file,     String rootCompoundName,     boolean useCompression)

Serialize the provided NBT data and write it to a file

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

See also

Parameters

data

NBT compound to serialize

file

File to write the data to

rootCompoundName

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

useCompression

If true, the serialized data will be gzipped before being written to the file

Throws

If the NBT data could not be serialized or the file could not be written to