public class NBTInputStream
extends java.io.DataInputStream
| Constructor and Description |
|---|
NBTInputStream(NBTManager nbtManager,
java.io.InputStream in)
Creates a
NBTInputStream that uses the specified
underlying InputStream. |
| Modifier and Type | Method and Description |
|---|---|
NamedNBT<?> |
readNamedTag()
Read the next named tag.
|
<T extends NBTBase> |
readNamedTag(NBTTagType<T> nbtTagType)
Read the next unnamed tag.
|
NBTBase |
readTag()
Read the next unnamed tag.
|
<T extends NBTBase> |
readTag(NBTTagType<T> nbtTagType)
Read the next unnamed tag.
|
read, read, readBoolean, readByte, readChar, readDouble, readFloat, readFully, readFully, readInt, readLine, readLong, readShort, readUnsignedByte, readUnsignedShort, readUTF, readUTF, skipBytespublic NBTInputStream(NBTManager nbtManager, java.io.InputStream in)
NBTInputStream that uses the specified
underlying InputStream.nbtManager - the NBTManager instancein - the specified input streampublic NBTBase readTag() throws java.io.IOException
java.io.IOException - if the discovered tag type is unknown or if a deserialization error occurspublic <T extends NBTBase> T readTag(NBTTagType<T> nbtTagType) throws java.io.IOException
T - the returned NBTBase type passed thought the NBTTagTypenbtTagType - the NBTTagType used to read the tag. It is also used to pass the generic NBT type.java.io.IOException - if the discovered tag type is unknown or if a deserialization error occurspublic NamedNBT<?> readNamedTag() throws java.io.IOException
String will be read to find the tag's type and name.java.io.IOException - if the discovered tag type is unknown or if a deserialization error occurspublic <T extends NBTBase> NamedNBT<T> readNamedTag(NBTTagType<T> nbtTagType) throws java.io.IOException
String will be read to find the tag's nameT - the returned NBTBase type passed thought the NBTTagTypenbtTagType - the NBTTagType used to read the tag. It is also used to pass the generic NBT type.java.io.IOException - if the discovered tag type is unknown or if a deserialization error occurs