public final class NBTOutputStream
extends java.lang.Object
implements java.io.Closeable
This class writes NBT, or Named Binary Tag
Tag objects to an underlying OutputStream.
The NBT format was created by Markus Persson, and the specification may be found at http://www.minecraft.net/docs/NBT.txt.
| Constructor and Description |
|---|
NBTOutputStream(java.io.OutputStream os)
Creates a new
NBTOutputStream, which will write data
to the
specified underlying output stream.
|
public NBTOutputStream(java.io.OutputStream os)
throws java.io.IOException
NBTOutputStream, which will write data to
the
specified underlying output stream.
os - The output stream.java.io.IOException - if an I/O error occurs.public void writeTag(Tag tag) throws java.io.IOException
tag - The tag to write.java.io.IOException - if an I/O error occurs.public void close()
throws java.io.IOException
close in interface java.io.Closeableclose in interface java.lang.AutoCloseable
java.io.IOException