Package com.viaversion.nbt.io
Class TagReader<T extends Tag>
java.lang.Object
com.viaversion.nbt.io.TagReader<T>
- Type Parameters:
T- the expected tag type
NBT tag reader.
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionnamed()Sets this reader to read a named tag.Reads the tag from the given data output.read(InputStream in) Reads a tag from the given input stream.Reads a tag from the given path.tagLimiter(TagLimiter tagLimiter) Sets the tag limiter to use per read tag, making the reader no longer thread-safe.
-
Method Details
-
tagLimiter
Sets the tag limiter to use per read tag, making the reader no longer thread-safe.- Parameters:
tagLimiter- the tag limiter to use- Returns:
- self
-
named
Sets this reader to read a named tag.- Returns:
- self
-
read
Reads the tag from the given data output.- Parameters:
in- data input to read from- Throws:
IOException- if an I/O error occurs
-
read
Reads a tag from the given input stream.- Parameters:
in- input stream to read from- Returns:
- the read tag
- Throws:
IOException- if an I/O error occurs
-
read
Reads a tag from the given path. At least so far, the standard format is always named, so make sure to callnamed().- Parameters:
path- path to read fromcompressed- whether the file is compressed- Throws:
IOException- if an I/O error occurs
-