Package net.kyori.adventure.nbt
Interface BinaryTagIO.Writer
- Enclosing class:
- BinaryTagIO
public static interface BinaryTagIO.Writer
CompoundBinaryTag writer.- Since:
- 4.4.0
-
Method Summary
Modifier and Type Method Description voidwrite(@NonNull CompoundBinaryTag tag, @NonNull DataOutput output)Writes a binary tag tooutput.default voidwrite(@NonNull CompoundBinaryTag tag, @NonNull OutputStream output)Writes a binary tag tooutput.voidwrite(@NonNull CompoundBinaryTag tag, @NonNull OutputStream output, @NonNull BinaryTagIO.Compression compression)Writes a binary tag tooutputwith acompressiontype.default voidwrite(@NonNull CompoundBinaryTag tag, @NonNull Path path)Writes a binary tag topathwith acompressiontype.voidwrite(@NonNull CompoundBinaryTag tag, @NonNull Path path, @NonNull BinaryTagIO.Compression compression)Writes a binary tag topathwith acompressiontype.voidwriteNamed(@NonNull Map.Entry<String,CompoundBinaryTag> tag, @NonNull DataOutput output)Writes a binary tag, with a name, tooutput.default voidwriteNamed(@NonNull Map.Entry<String,CompoundBinaryTag> tag, @NonNull OutputStream output)Writes a binary tag, with a name, tooutput.voidwriteNamed(@NonNull Map.Entry<String,CompoundBinaryTag> tag, @NonNull OutputStream output, @NonNull BinaryTagIO.Compression compression)Writes a binary tag, with a name, tooutputwith acompressiontype.default voidwriteNamed(@NonNull Map.Entry<String,CompoundBinaryTag> tag, @NonNull Path path)Writes a binary tag, with a name, topath.voidwriteNamed(@NonNull Map.Entry<String,CompoundBinaryTag> tag, @NonNull Path path, @NonNull BinaryTagIO.Compression compression)Writes a binary tag, with a name, topathwith acompressiontype.
-
Method Details
-
write
Writes a binary tag topathwith acompressiontype.This is the equivalent of passing
Compression#NONEas the second parameter towrite(CompoundBinaryTag, Path, Compression).- Parameters:
path- the path- Throws:
IOException- if an exception was encountered while reading the tag- Since:
- 4.4.0
-
write
void write(@NonNull CompoundBinaryTag tag, @NonNull Path path, @NonNull BinaryTagIO.Compression compression) throws IOExceptionWrites a binary tag topathwith acompressiontype.- Parameters:
path- the pathcompression- the compression type- Throws:
IOException- if an exception was encountered while reading the tag- Since:
- 4.4.0
-
write
default void write(@NonNull CompoundBinaryTag tag, @NonNull OutputStream output) throws IOExceptionWrites a binary tag tooutput.This is the equivalent of passing
BinaryTagIO.Compression.NONEas the second parameter towrite(CompoundBinaryTag, OutputStream, Compression).- Parameters:
output- the output stream- Throws:
IOException- if an exception was encountered while reading the tag- Since:
- 4.4.0
-
write
void write(@NonNull CompoundBinaryTag tag, @NonNull OutputStream output, @NonNull BinaryTagIO.Compression compression) throws IOExceptionWrites a binary tag tooutputwith acompressiontype.- Parameters:
output- the output streamcompression- the compression type- Throws:
IOException- if an exception was encountered while reading the tag- Since:
- 4.4.0
-
write
Writes a binary tag tooutput.- Parameters:
output- the output- Throws:
IOException- if an exception was encountered while reading the tag- Since:
- 4.4.0
-
writeNamed
default void writeNamed(@NonNull Map.Entry<String,CompoundBinaryTag> tag, @NonNull Path path) throws IOExceptionWrites a binary tag, with a name, topath.This is the equivalent of passing
Compression#NONEas the second parameter towrite(CompoundBinaryTag, Path, Compression).- Parameters:
path- the path- Throws:
IOException- if an exception was encountered while reading the tag- Since:
- 4.4.0
-
writeNamed
void writeNamed(@NonNull Map.Entry<String,CompoundBinaryTag> tag, @NonNull Path path, @NonNull BinaryTagIO.Compression compression) throws IOExceptionWrites a binary tag, with a name, topathwith acompressiontype.- Parameters:
path- the pathcompression- the compression type- Throws:
IOException- if an exception was encountered while reading the tag- Since:
- 4.4.0
-
writeNamed
default void writeNamed(@NonNull Map.Entry<String,CompoundBinaryTag> tag, @NonNull OutputStream output) throws IOExceptionWrites a binary tag, with a name, tooutput.This is the equivalent of passing
Compression#NONEas the second parameter towrite(CompoundBinaryTag, OutputStream, Compression).- Parameters:
output- the output stream- Throws:
IOException- if an exception was encountered while reading the tag- Since:
- 4.4.0
-
writeNamed
void writeNamed(@NonNull Map.Entry<String,CompoundBinaryTag> tag, @NonNull OutputStream output, @NonNull BinaryTagIO.Compression compression) throws IOExceptionWrites a binary tag, with a name, tooutputwith acompressiontype.- Parameters:
output- the output streamcompression- the compression type- Throws:
IOException- if an exception was encountered while reading the tag- Since:
- 4.4.0
-
writeNamed
void writeNamed(@NonNull Map.Entry<String,CompoundBinaryTag> tag, @NonNull DataOutput output) throws IOExceptionWrites a binary tag, with a name, tooutput.- Parameters:
output- the output- Throws:
IOException- if an exception was encountered while reading the tag- Since:
- 4.4.0
-