Class NBTInputStream

java.lang.Object
com.sk89q.jnbt.NBTInputStream
All Implemented Interfaces:
Closeable, AutoCloseable

@Deprecated(forRemoval=true) public final class NBTInputStream extends Object implements Closeable
Deprecated, for removal: This API element is subject to removal in a future version.
JNBT is being removed for lin-bus in WorldEdit 8, use LinBinaryIO instead
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 https://minecraft.gamepedia.com/NBT_format.

  • Constructor Summary

    Constructors
    Constructor
    Description
    Deprecated, for removal: This API element is subject to removal in a future version.
     
    Deprecated, for removal: This API element is subject to removal in a future version.
    Creates a new NBTInputStream, which will source its data from the specified input stream.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Deprecated, for removal: This API element is subject to removal in a future version.
     
    static int
    getSize(int type)
    Deprecated, for removal: This API element is subject to removal in a future version.
     
    void
    mark(int mark)
    Deprecated, for removal: This API element is subject to removal in a future version.
     
    Deprecated, for removal: This API element is subject to removal in a future version.
    Reads an NBT tag from the stream.
    void
    Deprecated, for removal: This API element is subject to removal in a future version.
     
    readNamedTagName(int type)
    Deprecated, for removal: This API element is subject to removal in a future version.
     
    Deprecated, for removal: This API element is subject to removal in a future version.
     
    readTagPayload(int type, int depth)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Reads the payload of a tag given the type.
    void
    readTagPayloadLazy(int type, int depth)
    Deprecated, for removal: This API element is subject to removal in a future version.
     
    void
    readTagPayloadLazy(int type, int depth, StreamDelegate scope)
    Deprecated, for removal: This API element is subject to removal in a future version.
     
    readTagPayloadRaw(int type, int depth)
    Deprecated, for removal: This API element is subject to removal in a future version.
     
    void
    Deprecated, for removal: This API element is subject to removal in a future version.
     
    Deprecated, for removal: This API element is subject to removal in a future version.
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • NBTInputStream

      public NBTInputStream(InputStream is)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Creates a new NBTInputStream, which will source its data from the specified input stream.
      Parameters:
      is - the input stream
    • NBTInputStream

      public NBTInputStream(DataInputStream dis)
      Deprecated, for removal: This API element is subject to removal in a future version.
  • Method Details

    • mark

      public void mark(int mark)
      Deprecated, for removal: This API element is subject to removal in a future version.
    • reset

      public void reset() throws IOException
      Deprecated, for removal: This API element is subject to removal in a future version.
      Throws:
      IOException
    • readNamedTag

      public NamedTag readNamedTag() throws IOException
      Deprecated, for removal: This API element is subject to removal in a future version.
      Reads an NBT tag from the stream.
      Returns:
      The tag that was read.
      Throws:
      IOException
    • readTag

      public Tag readTag() throws IOException
      Deprecated, for removal: This API element is subject to removal in a future version.
      Throws:
      IOException
    • readNamedTagLazy

      public void readNamedTagLazy(StreamDelegate scope) throws IOException
      Deprecated, for removal: This API element is subject to removal in a future version.
      Throws:
      IOException
    • readNamedTagName

      public String readNamedTagName(int type) throws IOException
      Deprecated, for removal: This API element is subject to removal in a future version.
      Throws:
      IOException
    • readTagPayloadLazy

      public void readTagPayloadLazy(int type, int depth) throws IOException
      Deprecated, for removal: This API element is subject to removal in a future version.
      Throws:
      IOException
    • readTagPayloadLazy

      public void readTagPayloadLazy(int type, int depth, StreamDelegate scope) throws IOException
      Deprecated, for removal: This API element is subject to removal in a future version.
      Throws:
      IOException
    • getSize

      public static int getSize(int type)
      Deprecated, for removal: This API element is subject to removal in a future version.
    • readTagPayloadRaw

      public Object readTagPayloadRaw(int type, int depth) throws IOException
      Deprecated, for removal: This API element is subject to removal in a future version.
      Throws:
      IOException
    • readTagPayload

      public Tag readTagPayload(int type, int depth) throws IOException
      Deprecated, for removal: This API element is subject to removal in a future version.
      Reads the payload of a tag given the type.
      Parameters:
      type - the type
      depth - the depth
      Returns:
      the tag
      Throws:
      IOException - if an I/O error occurs.
    • close

      public void close() throws IOException
      Deprecated, for removal: This API element is subject to removal in a future version.
      Specified by:
      close in interface AutoCloseable
      Specified by:
      close in interface Closeable
      Throws:
      IOException
    • toIterator

      public Iterator<CompoundTag> toIterator()
      Deprecated, for removal: This API element is subject to removal in a future version.