org.jnbt
Class NBTOutputStream

java.lang.Object
  extended by org.jnbt.NBTOutputStream
All Implemented Interfaces:
Closeable

public final class NBTOutputStream
extends Object
implements 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.

Author:
Graham Edgecombe

Constructor Summary
NBTOutputStream(OutputStream os)
          Creates a new NBTOutputStream, which will write data to the specified underlying output stream.
 
Method Summary
 void close()
           
 void writeTag(Tag tag)
          Writes a tag.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NBTOutputStream

public NBTOutputStream(OutputStream os)
                throws IOException
Creates a new NBTOutputStream, which will write data to the specified underlying output stream.

Parameters:
os - The output stream.
Throws:
IOException - if an I/O error occurs.
Method Detail

writeTag

public void writeTag(Tag tag)
              throws IOException
Writes a tag.

Parameters:
tag - The tag to write.
Throws:
IOException - if an I/O error occurs.

close

public void close()
           throws IOException
Specified by:
close in interface Closeable
Throws:
IOException