Package com.sk89q.jnbt
Class NBTInputStream
java.lang.Object
com.sk89q.jnbt.NBTInputStream
- All Implemented Interfaces:
Closeable
,AutoCloseable
Deprecated, for removal: This API element is subject to removal in a future version.
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
ConstructorDescriptionDeprecated, 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 newNBTInputStream
, which will source its data from the specified input stream. -
Method Summary
Modifier and TypeMethodDescriptionvoid
close()
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
readNamedTagLazy
(StreamDelegate scope) 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.readTag()
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
reset()
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.
-
Constructor Details
-
NBTInputStream
Deprecated, for removal: This API element is subject to removal in a future version.Creates a newNBTInputStream
, which will source its data from the specified input stream.- Parameters:
is
- the input stream
-
NBTInputStream
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
Deprecated, for removal: This API element is subject to removal in a future version.- Throws:
IOException
-
readNamedTag
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
Deprecated, for removal: This API element is subject to removal in a future version.- Throws:
IOException
-
readNamedTagLazy
Deprecated, for removal: This API element is subject to removal in a future version.- Throws:
IOException
-
readNamedTagName
Deprecated, for removal: This API element is subject to removal in a future version.- Throws:
IOException
-
readTagPayloadLazy
Deprecated, for removal: This API element is subject to removal in a future version.- Throws:
IOException
-
readTagPayloadLazy
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
Deprecated, for removal: This API element is subject to removal in a future version.- Throws:
IOException
-
readTagPayload
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 typedepth
- the depth- Returns:
- the tag
- Throws:
IOException
- if an I/O error occurs.
-
close
Deprecated, for removal: This API element is subject to removal in a future version.- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
- Throws:
IOException
-
toIterator
Deprecated, for removal: This API element is subject to removal in a future version.
-
LinBinaryIO
instead