public final class NBTInputStream
extends java.lang.Object
implements java.io.Closeable
Tag
object.
The NBT format was created by Markus Persson, and the specification may be found at https://minecraft.gamepedia.com/NBT_format.
Constructor and Description |
---|
NBTInputStream(java.io.InputStream is)
Creates a new
NBTInputStream , which will source its data
from the specified input stream. |
Modifier and Type | Method and Description |
---|---|
void |
close() |
NamedTag |
readNamedTag()
Reads an NBT tag from the stream.
|
public NBTInputStream(java.io.InputStream is)
NBTInputStream
, which will source its data
from the specified input stream.is
- the input streampublic NamedTag readNamedTag() throws java.io.IOException
java.io.IOException
- if an I/O error occurs.public void close() throws java.io.IOException
close
in interface java.io.Closeable
close
in interface java.lang.AutoCloseable
java.io.IOException