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 CompoundBinaryTagread(@NonNull DataInput input)Reads a binary tag frominput.default @NonNull CompoundBinaryTagread(@NonNull InputStream input)Reads a binary tag frominput.@NonNull CompoundBinaryTagread(@NonNull InputStream input, @NonNull BinaryTagIO.Compression compression)Reads a binary tag frominputwith acompressiontype.default @NonNull CompoundBinaryTagread(@NonNull Path path)Reads a binary tag frompath.@NonNull CompoundBinaryTagread(@NonNull Path path, @NonNull BinaryTagIO.Compression compression)Reads a binary tag frompathwith acompressiontype.@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#NONEas 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 frompathwith acompressiontype.- 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).- 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 frominputwith acompressiontype.- 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#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
@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#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
@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
-