Package org.mattrick.enbeet.io
Class NBTWriter
java.lang.Object
org.mattrick.enbeet.io.NBTWriter
-
Constructor Summary
ConstructorsConstructorDescriptionNBTWriter(OutputStream out)Create a new NBTWriter with the given output stream.NBTWriter(OutputStream out, boolean gzip)Create a new NBTWriter, optionally applying Gzip compression. -
Method Summary
Modifier and TypeMethodDescriptionvoidwrite(NBTCompound nbt)Writes the given NBTCompound to the given OutputStream.
-
Constructor Details
-
NBTWriter
Create a new NBTWriter with the given output stream. Will apply Gzip compression by default.- Parameters:
out- The OutputStream to write to.- Throws:
IOException- if there was an issue creating the GzipOutputStream.
-
NBTWriter
Create a new NBTWriter, optionally applying Gzip compression.- Parameters:
out- The OutputStream to write to.gzip- Should this NBTWriter apply Gzip compression.- Throws:
IOException- if there was an issue creating the GzipOutputStream.
-
-
Method Details
-
write
Writes the given NBTCompound to the given OutputStream.- Parameters:
nbt- The NBTCompound to write.- Throws:
IOException- if there was an issue writing to the OutputStream.
-