Package net.kyori.adventure.nbt
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 DataInput input)
Reads a binary tag frominput
.default @NotNull CompoundBinaryTag
read(@NotNull InputStream input)
Reads a binary tag frominput
.@NotNull CompoundBinaryTag
read(@NotNull InputStream input, @NotNull BinaryTagIO.Compression compression)
Reads a binary tag frominput
with acompression
type.default @NotNull CompoundBinaryTag
read(@NotNull Path path)
Reads a binary tag frompath
.@NotNull CompoundBinaryTag
read(@NotNull Path path, @NotNull BinaryTagIO.Compression compression)
Reads a binary tag frompath
with acompression
type.@NotNull Map.Entry<String,CompoundBinaryTag>
readNamed(@NotNull DataInput input)
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>
readNamed(@NotNull Path path)
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
.
-
-
-
Method Detail
-
read
@NotNull default @NotNull CompoundBinaryTag read(@NotNull @NotNull Path path) throws IOException
Reads a binary tag frompath
.This is the equivalent of passing
Compression#NONE
as the second parameter toread(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
-
read
@NotNull @NotNull CompoundBinaryTag read(@NotNull @NotNull Path path, @NotNull @NotNull BinaryTagIO.Compression compression) throws IOException
Reads a binary tag frompath
with acompression
type.- 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#NONE
as the second parameter toread(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
-
read
@NotNull @NotNull CompoundBinaryTag read(@NotNull @NotNull InputStream input, @NotNull @NotNull BinaryTagIO.Compression compression) throws IOException
Reads a binary tag frominput
with acompression
type.- 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
@NotNull @NotNull CompoundBinaryTag read(@NotNull @NotNull DataInput input) throws IOException
Reads a binary tag frominput
.- 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
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#NONE
as 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#NONE
as 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
-
-