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 adventure-nbt in WorldEdit 8.
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.
     
    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.
     

    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 - if an I/O error occurs.
    • 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
    • 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