- Enclosing class:
BinaryTagIO
CompoundBinaryTag reader.- Since:
- 4.4.0
-
Method Summary
Modifier and TypeMethodDescriptionReads a binary tag frominput.default CompoundBinaryTagread(InputStream input) Reads a binary tag frominput.read(InputStream input, BinaryTagIO.Compression compression) Reads a binary tag frominputwith acompressiontype.default CompoundBinaryTagReads a binary tag frompath.read(Path path, BinaryTagIO.Compression compression) Reads a binary tag frompathwith acompressiontype.Reads a binary tag, with a name, frominput.default Map.Entry<String, CompoundBinaryTag> readNamed(InputStream input) Reads a binary tag, with a name, frominput.readNamed(InputStream input, BinaryTagIO.Compression compression) Reads a binary tag, with a name, frominput.default Map.Entry<String, CompoundBinaryTag> Reads a binary tag, with a name, frompath.readNamed(Path path, BinaryTagIO.Compression compression) Reads a binary tag, with a name, frompath.readNameless(DataInput input) Reads a binary tag frominput.default CompoundBinaryTagreadNameless(InputStream input) Reads a binary tag frominput.readNameless(InputStream input, BinaryTagIO.Compression compression) Reads a binary tag frominputwith acompressiontype.default CompoundBinaryTagreadNameless(Path path) Reads a binary tag frompath.readNameless(Path path, BinaryTagIO.Compression compression) Reads a binary tag frompathwith acompressiontype.
-
Method Details
-
read
Reads a binary tag frompath.This is the equivalent of passing
Compression#NONEas the second parameter toread(Path, Compression).The root name field is discarded.
- Parameters:
path- the path- Returns:
- a binary tag
- Throws:
IOException- if an exception was encountered while reading the tag- Since:
- 4.4.0
-
read
Reads a binary tag frompathwith acompressiontype.The root name field is discarded.
- Parameters:
path- the pathcompression- the compression type- Returns:
- a binary tag
- Throws:
IOException- if an exception was encountered while reading the tag- Since:
- 4.4.0
-
read
Reads a binary tag frominput.This is the equivalent of passing
Compression#NONEas the second parameter toread(InputStream, Compression).The root name field is discarded.
- Parameters:
input- the input stream- Returns:
- a binary tag
- Throws:
IOException- if an exception was encountered while reading the tag- Since:
- 4.4.0
-
read
Reads a binary tag frominputwith acompressiontype.The root name field is discarded.
- Parameters:
input- the input streamcompression- the compression type- Returns:
- a binary tag
- Throws:
IOException- if an exception was encountered while reading the tag- Since:
- 4.4.0
-
read
Reads a binary tag frominput.The root name field is discarded.
- Parameters:
input- the input stream- Returns:
- a binary tag
- Throws:
IOException- if an exception was encountered while reading the tag- Since:
- 4.4.0
-
readNameless
Reads a binary tag frompath.This is the equivalent of passing
Compression#NONEas the second parameter toread(Path, Compression).Doesn't read a root name from the
Pathat all, to match the wire protocol in modern game versions.- Parameters:
path- the path- Returns:
- a binary tag
- Throws:
IOException- if an exception was encountered while reading the tag- Since:
- 4.15.0
- Since Minecraft:
- 1.20.2
-
readNameless
Reads a binary tag frompathwith acompressiontype.Doesn't read a root name from the
Pathat all, to match the wire protocol in modern game versions.- Parameters:
path- the pathcompression- the compression type- Returns:
- a binary tag
- Throws:
IOException- if an exception was encountered while reading the tag- Since:
- 4.15.0
- Since Minecraft:
- 1.20.2
-
readNameless
Reads a binary tag frominput.This is the equivalent of passing
Compression#NONEas the second parameter toread(InputStream, Compression).Doesn't read a root name from the
InputStreamat all, to match the wire protocol in modern game versions.- Parameters:
input- the input stream- Returns:
- a binary tag
- Throws:
IOException- if an exception was encountered while reading the tag- Since:
- 4.15.0
- Since Minecraft:
- 1.20.2
-
readNameless
CompoundBinaryTag readNameless(InputStream input, BinaryTagIO.Compression compression) throws IOException Reads a binary tag frominputwith acompressiontype.Doesn't read a root name from the
InputStreamat all, to match the wire protocol in modern game versions.- Parameters:
input- the input streamcompression- the compression type- Returns:
- a binary tag
- Throws:
IOException- if an exception was encountered while reading the tag- Since:
- 4.15.0
- Since Minecraft:
- 1.20.2
-
readNameless
Reads a binary tag frominput.Doesn't read a root name from the
DataInputat all, to match the wire protocol in modern game versions.- Parameters:
input- the input stream- Returns:
- a binary tag
- Throws:
IOException- if an exception was encountered while reading the tag- Since:
- 4.15.0
- Since Minecraft:
- 1.20.2
-
readNamed
Reads a binary tag, with a name, frompath.This is the equivalent of passing
Compression#NONEas the second parameter toreadNamed(Path, Compression).- Parameters:
path- the path- Returns:
- a binary tag
- Throws:
IOException- if an exception was encountered while reading the tag- Since:
- 4.4.0
-
readNamed
Map.Entry<String,CompoundBinaryTag> readNamed(Path path, BinaryTagIO.Compression compression) throws IOException Reads a binary tag, with a name, frompath.- Parameters:
path- the pathcompression- the compression type- Returns:
- a binary tag
- Throws:
IOException- if an exception was encountered while reading the tag- Since:
- 4.4.0
-
readNamed
Reads a binary tag, with a name, frominput.This is the equivalent of passing
Compression#NONEas the second parameter toreadNamed(InputStream, Compression).- Parameters:
input- the input stream- Returns:
- a binary tag
- Throws:
IOException- if an exception was encountered while reading the tag- Since:
- 4.4.0
-
readNamed
Map.Entry<String,CompoundBinaryTag> readNamed(InputStream input, BinaryTagIO.Compression compression) throws IOException Reads a binary tag, with a name, frominput.- Parameters:
input- the input streamcompression- the compression type- Returns:
- a binary tag
- Throws:
IOException- if an exception was encountered while reading the tag- Since:
- 4.4.0
-
readNamed
Reads a binary tag, with a name, frominput.- Parameters:
input- the input- Returns:
- a binary tag
- Throws:
IOException- if an exception was encountered while reading the tag- Since:
- 4.4.0
-