Interface BinaryTagIO.Reader
- Enclosing class:
- BinaryTagIO
CompoundBinaryTag reader.- Since:
- 4.4.0
-
Method Summary
Modifier and TypeMethodDescription@NotNull CompoundBinaryTagReads a binary tag frominput.default @NotNull CompoundBinaryTagread(@NotNull InputStream input) Reads a binary tag frominput.@NotNull CompoundBinaryTagread(@NotNull InputStream input, @NotNull BinaryTagIO.Compression compression) Reads a binary tag frominputwith acompressiontype.default @NotNull CompoundBinaryTagReads a binary tag frompath.@NotNull CompoundBinaryTagread(@NotNull Path path, @NotNull BinaryTagIO.Compression compression) Reads a binary tag frompathwith acompressiontype.@NotNull Map.Entry<String,CompoundBinaryTag> Reads a binary tag, with a name, frominput.default @NotNull Map.Entry<String,CompoundBinaryTag> readNamed(@NotNull InputStream input) Reads a binary tag, with a name, frominput.@NotNull Map.Entry<String,CompoundBinaryTag> readNamed(@NotNull InputStream input, @NotNull BinaryTagIO.Compression compression) Reads a binary tag, with a name, frominput.default @NotNull Map.Entry<String,CompoundBinaryTag> Reads a binary tag, with a name, frompath.@NotNull Map.Entry<String,CompoundBinaryTag> readNamed(@NotNull Path path, @NotNull BinaryTagIO.Compression compression) Reads a binary tag, with a name, frompath.@NotNull CompoundBinaryTagreadNameless(@NotNull DataInput input) Reads a binary tag frominput.default @NotNull CompoundBinaryTagreadNameless(@NotNull InputStream input) Reads a binary tag frominput.@NotNull CompoundBinaryTagreadNameless(@NotNull InputStream input, @NotNull BinaryTagIO.Compression compression) Reads a binary tag frominputwith acompressiontype.default @NotNull CompoundBinaryTagreadNameless(@NotNull Path path) Reads a binary tag frompath.@NotNull CompoundBinaryTagreadNameless(@NotNull Path path, @NotNull 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
@NotNull @NotNull CompoundBinaryTag read(@NotNull @NotNull Path path, @NotNull @NotNull BinaryTagIO.Compression compression) throws IOException 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
@NotNull default @NotNull CompoundBinaryTag read(@NotNull @NotNull InputStream input) throws IOException 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
@NotNull @NotNull CompoundBinaryTag read(@NotNull @NotNull InputStream input, @NotNull @NotNull BinaryTagIO.Compression compression) throws IOException 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
@NotNull default @NotNull CompoundBinaryTag readNameless(@NotNull @NotNull Path path) throws IOException 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
@NotNull @NotNull CompoundBinaryTag readNameless(@NotNull @NotNull Path path, @NotNull @NotNull BinaryTagIO.Compression compression) throws IOException 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
@NotNull default @NotNull CompoundBinaryTag readNameless(@NotNull @NotNull InputStream input) throws IOException 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
@NotNull @NotNull CompoundBinaryTag readNameless(@NotNull @NotNull InputStream input, @NotNull @NotNull 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
@NotNull @NotNull CompoundBinaryTag readNameless(@NotNull @NotNull DataInput input) throws IOException 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
default @NotNull Map.Entry<String,CompoundBinaryTag> readNamed(@NotNull @NotNull Path path) throws IOException 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
@NotNull Map.Entry<String,CompoundBinaryTag> readNamed(@NotNull @NotNull Path path, @NotNull @NotNull 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
default @NotNull Map.Entry<String,CompoundBinaryTag> readNamed(@NotNull @NotNull InputStream input) throws IOException 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
@NotNull Map.Entry<String,CompoundBinaryTag> readNamed(@NotNull @NotNull InputStream input, @NotNull @NotNull 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
@NotNull Map.Entry<String,CompoundBinaryTag> readNamed(@NotNull @NotNull DataInput input) throws IOException 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
-