com.intellectualcrafters.jnbt

## Class NBTOutputStream

- java.lang.Object
- - com.intellectualcrafters.jnbt.NBTOutputStream

- All Implemented Interfaces:
    java.io.Closeable, java.lang.AutoCloseable

      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 Summary

    Constructors
    Constructor and Description
    `NBTOutputStream(java.io.OutputStream os)` Creates a new `NBTOutputStream`, which will write data to the specified underlying output stream.

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `close()`
    `void` | `writeTag(Tag tag)` Writes a tag.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### NBTOutputStream

          public NBTOutputStream(java.io.OutputStream os)
                          throws java.io.IOException

      Creates a new `NBTOutputStream`, which will write data to the specified underlying output stream.
      Parameters:
        `os` - The output stream.
      Throws:
        `java.io.IOException` - if an I/O error occurs.

  - ### Method Detail

    - #### writeTag

          public void writeTag(Tag tag)
                        throws java.io.IOException

      Writes a tag.
      Parameters:
        `tag` - The tag to write.
      Throws:
        `java.io.IOException` - if an I/O error occurs.

    - #### close

          public void close()
                     throws java.io.IOException

      Specified by:
        `close` in interface `java.io.Closeable`
      Specified by:
        `close` in interface `java.lang.AutoCloseable`
      Throws:
        `java.io.IOException`