com.intellectualcrafters.jnbt

## Class NBTInputStream

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

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

      public final class NBTInputStream
      extends java.lang.Object
      implements java.io.Closeable

  This class reads NBT, or Named Binary Tag streams, and produces an object graph of subclasses of the `Tag` object.

  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
    `NBTInputStream(java.io.InputStream is)` Creates a new `NBTInputStream`, which will source its data from the specified input stream.

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `close()`
    `Tag` | `readTag()` Reads an NBT tag from the stream.

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

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

- - ### Constructor Detail

    - #### NBTInputStream

          public NBTInputStream(java.io.InputStream is)
                         throws java.io.IOException

      Creates a new `NBTInputStream`, which will source its data from the specified input stream.
      Parameters:
        `is` - the input stream
      Throws:
        `java.io.IOException` - if an I/O error occurs

  - ### Method Detail

    - #### readTag

          public Tag readTag()
                      throws java.io.IOException

      Reads an NBT tag from the stream.
      Returns:
        The tag that was read.
      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`