Interface BinaryTagIO.Reader
-
- Enclosing class:
- BinaryTagIO
public static interface BinaryTagIO.Reader
CompoundBinaryTag
reader.- Since:
- 4.4.0
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description @NotNull CompoundBinaryTag
read(@NotNull java.io.DataInput input)
Reads a binary tag frominput
.default @NotNull CompoundBinaryTag
read(@NotNull java.io.InputStream input)
Reads a binary tag frominput
.@NotNull CompoundBinaryTag
read(@NotNull java.io.InputStream input, @NotNull BinaryTagIO.Compression compression)
Reads a binary tag frominput
with acompression
type.default @NotNull CompoundBinaryTag
read(@NotNull java.nio.file.Path path)
Reads a binary tag frompath
.@NotNull CompoundBinaryTag
read(@NotNull java.nio.file.Path path, @NotNull BinaryTagIO.Compression compression)
Reads a binary tag frompath
with acompression
type.@NotNull java.util.Map.Entry<java.lang.String,CompoundBinaryTag>
readNamed(@NotNull java.io.DataInput input)
Reads a binary tag, with a name, frominput
.default @NotNull java.util.Map.Entry<java.lang.String,CompoundBinaryTag>
readNamed(@NotNull java.io.InputStream input)
Reads a binary tag, with a name, frominput
.@NotNull java.util.Map.Entry<java.lang.String,CompoundBinaryTag>
readNamed(@NotNull java.io.InputStream input, @NotNull BinaryTagIO.Compression compression)
Reads a binary tag, with a name, frominput
.default @NotNull java.util.Map.Entry<java.lang.String,CompoundBinaryTag>
readNamed(@NotNull java.nio.file.Path path)
Reads a binary tag, with a name, frompath
.@NotNull java.util.Map.Entry<java.lang.String,CompoundBinaryTag>
readNamed(@NotNull java.nio.file.Path path, @NotNull BinaryTagIO.Compression compression)
Reads a binary tag, with a name, frompath
.@NotNull CompoundBinaryTag
readNameless(@NotNull java.io.DataInput input)
Reads a binary tag frominput
.default @NotNull CompoundBinaryTag
readNameless(@NotNull java.io.InputStream input)
Reads a binary tag frominput
.@NotNull CompoundBinaryTag
readNameless(@NotNull java.io.InputStream input, @NotNull BinaryTagIO.Compression compression)
Reads a binary tag frominput
with acompression
type.default @NotNull CompoundBinaryTag
readNameless(@NotNull java.nio.file.Path path)
Reads a binary tag frompath
.@NotNull CompoundBinaryTag
readNameless(@NotNull java.nio.file.Path path, @NotNull BinaryTagIO.Compression compression)
Reads a binary tag frompath
with acompression
type.
-
-
-
Method Detail
-
read
@NotNull default @NotNull CompoundBinaryTag read(@NotNull @NotNull java.nio.file.Path path) throws java.io.IOException
Reads a binary tag frompath
.This is the equivalent of passing
Compression#NONE
as the second parameter toread(Path, Compression)
.The root name field is discarded.
- Parameters:
path
- the path- Returns:
- a binary tag
- Throws:
java.io.IOException
- if an exception was encountered while reading the tag- Since:
- 4.4.0
-
read
@NotNull @NotNull CompoundBinaryTag read(@NotNull @NotNull java.nio.file.Path path, @NotNull @NotNull BinaryTagIO.Compression compression) throws java.io.IOException
Reads a binary tag frompath
with acompression
type.The root name field is discarded.
- Parameters:
path
- the pathcompression
- the compression type- Returns:
- a binary tag
- Throws:
java.io.IOException
- if an exception was encountered while reading the tag- Since:
- 4.4.0
-
read
@NotNull default @NotNull CompoundBinaryTag read(@NotNull @NotNull java.io.InputStream input) throws java.io.IOException
Reads a binary tag frominput
.This is the equivalent of passing
Compression#NONE
as the second parameter toread(InputStream, Compression)
.The root name field is discarded.
- Parameters:
input
- the input stream- Returns:
- a binary tag
- Throws:
java.io.IOException
- if an exception was encountered while reading the tag- Since:
- 4.4.0
-
read
@NotNull @NotNull CompoundBinaryTag read(@NotNull @NotNull java.io.InputStream input, @NotNull @NotNull BinaryTagIO.Compression compression) throws java.io.IOException
Reads a binary tag frominput
with acompression
type.The root name field is discarded.
- Parameters:
input
- the input streamcompression
- the compression type- Returns:
- a binary tag
- Throws:
java.io.IOException
- if an exception was encountered while reading the tag- Since:
- 4.4.0
-
read
@NotNull @NotNull CompoundBinaryTag read(@NotNull @NotNull java.io.DataInput input) throws java.io.IOException
Reads a binary tag frominput
.The root name field is discarded.
- Parameters:
input
- the input stream- Returns:
- a binary tag
- Throws:
java.io.IOException
- if an exception was encountered while reading the tag- Since:
- 4.4.0
-
readNameless
@NotNull default @NotNull CompoundBinaryTag readNameless(@NotNull @NotNull java.nio.file.Path path) throws java.io.IOException
Reads a binary tag frompath
.This is the equivalent of passing
Compression#NONE
as the second parameter toread(Path, Compression)
.Doesn't read a root name from the
Path
at all, to match the wire protocol in modern game versions.- Parameters:
path
- the path- Returns:
- a binary tag
- Throws:
java.io.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 java.nio.file.Path path, @NotNull @NotNull BinaryTagIO.Compression compression) throws java.io.IOException
Reads a binary tag frompath
with acompression
type.Doesn't read a root name from the
Path
at all, to match the wire protocol in modern game versions.- Parameters:
path
- the pathcompression
- the compression type- Returns:
- a binary tag
- Throws:
java.io.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 java.io.InputStream input) throws java.io.IOException
Reads a binary tag frominput
.This is the equivalent of passing
Compression#NONE
as the second parameter toread(InputStream, Compression)
.Doesn't read a root name from the
InputStream
at all, to match the wire protocol in modern game versions.- Parameters:
input
- the input stream- Returns:
- a binary tag
- Throws:
java.io.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 java.io.InputStream input, @NotNull @NotNull BinaryTagIO.Compression compression) throws java.io.IOException
Reads a binary tag frominput
with acompression
type.Doesn't read a root name from the
InputStream
at all, to match the wire protocol in modern game versions.- Parameters:
input
- the input streamcompression
- the compression type- Returns:
- a binary tag
- Throws:
java.io.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 java.io.DataInput input) throws java.io.IOException
Reads a binary tag frominput
.Doesn't read a root name from the
DataInput
at all, to match the wire protocol in modern game versions.- Parameters:
input
- the input stream- Returns:
- a binary tag
- Throws:
java.io.IOException
- if an exception was encountered while reading the tag- Since:
- 4.15.0
- Since Minecraft:
- 1.20.2
-
readNamed
default @NotNull java.util.Map.Entry<java.lang.String,CompoundBinaryTag> readNamed(@NotNull @NotNull java.nio.file.Path path) throws java.io.IOException
Reads a binary tag, with a name, frompath
.This is the equivalent of passing
Compression#NONE
as the second parameter toreadNamed(Path, Compression)
.- Parameters:
path
- the path- Returns:
- a binary tag
- Throws:
java.io.IOException
- if an exception was encountered while reading the tag- Since:
- 4.4.0
-
readNamed
@NotNull java.util.Map.Entry<java.lang.String,CompoundBinaryTag> readNamed(@NotNull @NotNull java.nio.file.Path path, @NotNull @NotNull BinaryTagIO.Compression compression) throws java.io.IOException
Reads a binary tag, with a name, frompath
.- Parameters:
path
- the pathcompression
- the compression type- Returns:
- a binary tag
- Throws:
java.io.IOException
- if an exception was encountered while reading the tag- Since:
- 4.4.0
-
readNamed
default @NotNull java.util.Map.Entry<java.lang.String,CompoundBinaryTag> readNamed(@NotNull @NotNull java.io.InputStream input) throws java.io.IOException
Reads a binary tag, with a name, frominput
.This is the equivalent of passing
Compression#NONE
as the second parameter toreadNamed(InputStream, Compression)
.- Parameters:
input
- the input stream- Returns:
- a binary tag
- Throws:
java.io.IOException
- if an exception was encountered while reading the tag- Since:
- 4.4.0
-
readNamed
@NotNull java.util.Map.Entry<java.lang.String,CompoundBinaryTag> readNamed(@NotNull @NotNull java.io.InputStream input, @NotNull @NotNull BinaryTagIO.Compression compression) throws java.io.IOException
Reads a binary tag, with a name, frominput
.- Parameters:
input
- the input streamcompression
- the compression type- Returns:
- a binary tag
- Throws:
java.io.IOException
- if an exception was encountered while reading the tag- Since:
- 4.4.0
-
readNamed
@NotNull java.util.Map.Entry<java.lang.String,CompoundBinaryTag> readNamed(@NotNull @NotNull java.io.DataInput input) throws java.io.IOException
Reads a binary tag, with a name, frominput
.- Parameters:
input
- the input- Returns:
- a binary tag
- Throws:
java.io.IOException
- if an exception was encountered while reading the tag- Since:
- 4.4.0
-
-