Package net.kyori.adventure.nbt
Interface BinaryTagIO.Reader
- Enclosing class:
- BinaryTagIO
public static interface BinaryTagIO.Reader
CompoundBinaryTag
reader.- Since:
- 4.4.0
-
Method Summary
Modifier and Type Method Description @NonNull CompoundBinaryTag
read(@NonNull DataInput input)
Reads a binary tag frominput
.default @NonNull CompoundBinaryTag
read(@NonNull InputStream input)
Reads a binary tag frominput
.@NonNull CompoundBinaryTag
read(@NonNull InputStream input, @NonNull BinaryTagIO.Compression compression)
Reads a binary tag frominput
with acompression
type.default @NonNull CompoundBinaryTag
read(@NonNull Path path)
Reads a binary tag frompath
.@NonNull CompoundBinaryTag
read(@NonNull Path path, @NonNull BinaryTagIO.Compression compression)
Reads a binary tag frompath
with acompression
type.@NonNull Map.Entry<String,CompoundBinaryTag>
readNamed(@NonNull DataInput input)
Reads a binary tag, with a name, frominput
.default @NonNull Map.Entry<String,CompoundBinaryTag>
readNamed(@NonNull InputStream input)
Reads a binary tag, with a name, frominput
.@NonNull Map.Entry<String,CompoundBinaryTag>
readNamed(@NonNull InputStream input, @NonNull BinaryTagIO.Compression compression)
Reads a binary tag, with a name, frominput
.default @NonNull Map.Entry<String,CompoundBinaryTag>
readNamed(@NonNull Path path)
Reads a binary tag, with a name, frompath
.@NonNull Map.Entry<String,CompoundBinaryTag>
readNamed(@NonNull Path path, @NonNull BinaryTagIO.Compression compression)
Reads a binary tag, with a name, frompath
.
-
Method Details
-
read
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
@NonNull CompoundBinaryTag read(@NonNull Path path, @NonNull BinaryTagIO.Compression compression) throws IOExceptionReads 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
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
@NonNull CompoundBinaryTag read(@NonNull InputStream input, @NonNull BinaryTagIO.Compression compression) throws IOExceptionReads 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
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 @NonNull Map.Entry<String,CompoundBinaryTag> readNamed(@NonNull Path path) throws IOExceptionReads 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
@NonNull Map.Entry<String,CompoundBinaryTag> readNamed(@NonNull Path path, @NonNull BinaryTagIO.Compression compression) throws IOExceptionReads 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 @NonNull Map.Entry<String,CompoundBinaryTag> readNamed(@NonNull InputStream input) throws IOExceptionReads 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
@NonNull Map.Entry<String,CompoundBinaryTag> readNamed(@NonNull InputStream input, @NonNull BinaryTagIO.Compression compression) throws IOExceptionReads 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
@NonNull Map.Entry<String,CompoundBinaryTag> readNamed(@NonNull DataInput input) throws IOExceptionReads 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
-