Interface BinaryTagIO.Writer
- Enclosing class:
- BinaryTagIO
CompoundBinaryTag writer.- Since:
- 4.4.0
-
Method Summary
Modifier and TypeMethodDescriptionvoidwrite(@NotNull CompoundBinaryTag tag, @NotNull DataOutput output) Writes a binary tag tooutput.default voidwrite(@NotNull CompoundBinaryTag tag, @NotNull OutputStream output) Writes a binary tag tooutput.voidwrite(@NotNull CompoundBinaryTag tag, @NotNull OutputStream output, @NotNull BinaryTagIO.Compression compression) Writes a binary tag tooutputwith acompressiontype.default voidwrite(@NotNull CompoundBinaryTag tag, @NotNull Path path) Writes a binary tag topathwith acompressiontype.voidwrite(@NotNull CompoundBinaryTag tag, @NotNull Path path, @NotNull BinaryTagIO.Compression compression) Writes a binary tag topathwith acompressiontype.voidwriteNamed(@NotNull Map.Entry<String, CompoundBinaryTag> tag, @NotNull DataOutput output) Writes a binary tag, with a name, tooutput.default voidwriteNamed(@NotNull Map.Entry<String, CompoundBinaryTag> tag, @NotNull OutputStream output) Writes a binary tag, with a name, tooutput.voidwriteNamed(@NotNull Map.Entry<String, CompoundBinaryTag> tag, @NotNull OutputStream output, @NotNull BinaryTagIO.Compression compression) Writes a binary tag, with a name, tooutputwith acompressiontype.default voidwriteNamed(@NotNull Map.Entry<String, CompoundBinaryTag> tag, @NotNull Path path) Writes a binary tag, with a name, topath.voidwriteNamed(@NotNull Map.Entry<String, CompoundBinaryTag> tag, @NotNull Path path, @NotNull BinaryTagIO.Compression compression) Writes a binary tag, with a name, topathwith acompressiontype.voidwriteNameless(@NotNull CompoundBinaryTag tag, @NotNull DataOutput output) Writes a binary tag tooutput.default voidwriteNameless(@NotNull CompoundBinaryTag tag, @NotNull OutputStream output) Writes a binary tag tooutput.voidwriteNameless(@NotNull CompoundBinaryTag tag, @NotNull OutputStream output, @NotNull BinaryTagIO.Compression compression) Writes a binary tag tooutputwith acompressiontype.default voidwriteNameless(@NotNull CompoundBinaryTag tag, @NotNull Path path) Writes a binary tag topathwith acompressiontype.voidwriteNameless(@NotNull CompoundBinaryTag tag, @NotNull Path path, @NotNull BinaryTagIO.Compression compression) Writes a binary tag topathwith acompressiontype.
-
Method Details
-
write
default void write(@NotNull @NotNull CompoundBinaryTag tag, @NotNull @NotNull Path path) throws IOException Writes a binary tag topathwith acompressiontype.This is the equivalent of passing
Compression#NONEas the second parameter towrite(CompoundBinaryTag, Path, Compression).An empty root name is written.
- Parameters:
tag- the tag to writepath- the path- Throws:
IOException- if an exception was encountered while reading the tag- Since:
- 4.4.0
-
write
void write(@NotNull @NotNull CompoundBinaryTag tag, @NotNull @NotNull Path path, @NotNull @NotNull BinaryTagIO.Compression compression) throws IOException Writes a binary tag topathwith acompressiontype.An empty root name is written.
- Parameters:
tag- the tag to writepath- the pathcompression- the compression type- Throws:
IOException- if an exception was encountered while reading the tag- Since:
- 4.4.0
-
write
default void write(@NotNull @NotNull CompoundBinaryTag tag, @NotNull @NotNull OutputStream output) throws IOException Writes a binary tag tooutput.This is the equivalent of passing
BinaryTagIO.Compression.NONEas the second parameter towrite(CompoundBinaryTag, OutputStream, Compression).An empty root name is written.
- Parameters:
tag- the tag to writeoutput- the output stream- Throws:
IOException- if an exception was encountered while reading the tag- Since:
- 4.4.0
-
write
void write(@NotNull @NotNull CompoundBinaryTag tag, @NotNull @NotNull OutputStream output, @NotNull @NotNull BinaryTagIO.Compression compression) throws IOException Writes a binary tag tooutputwith acompressiontype.An empty root name is written.
- Parameters:
tag- the tag to writeoutput- the output streamcompression- the compression type- Throws:
IOException- if an exception was encountered while reading the tag- Since:
- 4.4.0
-
write
void write(@NotNull @NotNull CompoundBinaryTag tag, @NotNull @NotNull DataOutput output) throws IOException Writes a binary tag tooutput.An empty root name is written.
- Parameters:
tag- the tag to writeoutput- the output- Throws:
IOException- if an exception was encountered while reading the tag- Since:
- 4.4.0
-
writeNameless
default void writeNameless(@NotNull @NotNull CompoundBinaryTag tag, @NotNull @NotNull Path path) throws IOException Writes a binary tag topathwith acompressiontype.This is the equivalent of passing
Compression#NONEas the second parameter towrite(CompoundBinaryTag, Path, Compression).Doesn't write a root name to the
Pathat all, to match the wire protocol in modern game versions.- Parameters:
tag- the tag to writepath- the path- Throws:
IOException- if an exception was encountered while reading the tag- Since:
- 4.15.0
- Since Minecraft:
- 1.20.2
-
writeNameless
void writeNameless(@NotNull @NotNull CompoundBinaryTag tag, @NotNull @NotNull Path path, @NotNull @NotNull BinaryTagIO.Compression compression) throws IOException Writes a binary tag topathwith acompressiontype.Doesn't write a root name to the
Pathat all, to match the wire protocol in modern game versions.- Parameters:
tag- the tag to writepath- the pathcompression- the compression type- Throws:
IOException- if an exception was encountered while reading the tag- Since:
- 4.15.0
- Since Minecraft:
- 1.20.2
-
writeNameless
default void writeNameless(@NotNull @NotNull CompoundBinaryTag tag, @NotNull @NotNull OutputStream output) throws IOException Writes a binary tag tooutput.This is the equivalent of passing
BinaryTagIO.Compression.NONEas the second parameter towrite(CompoundBinaryTag, OutputStream, Compression).Doesn't write a root name to the
OutputStreamat all, to match the wire protocol in modern game versions.- Parameters:
tag- the tag to writeoutput- the output stream- Throws:
IOException- if an exception was encountered while reading the tag- Since:
- 4.15.0
- Since Minecraft:
- 1.20.2
-
writeNameless
void writeNameless(@NotNull @NotNull CompoundBinaryTag tag, @NotNull @NotNull OutputStream output, @NotNull @NotNull BinaryTagIO.Compression compression) throws IOException Writes a binary tag tooutputwith acompressiontype.Doesn't write a root name to the
OutputStreamat all, to match the wire protocol in modern game versions.- Parameters:
tag- the tag to writeoutput- the output streamcompression- the compression type- Throws:
IOException- if an exception was encountered while reading the tag- Since:
- 4.15.0
- Since Minecraft:
- 1.20.2
-
writeNameless
void writeNameless(@NotNull @NotNull CompoundBinaryTag tag, @NotNull @NotNull DataOutput output) throws IOException Writes a binary tag tooutput.Doesn't write a root name to the
DataOutputat all, to match the wire protocol in modern game versions.- Parameters:
tag- the tag to writeoutput- the output- Throws:
IOException- if an exception was encountered while reading the tag- Since:
- 4.15.0
- Since Minecraft:
- 1.20.2
-
writeNamed
default void writeNamed(@NotNull Map.Entry<String, CompoundBinaryTag> tag, @NotNull @NotNull 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:
tag- the named tag entry to writepath- the path- Throws:
IOException- if an exception was encountered while reading the tag- Since:
- 4.4.0
-
writeNamed
void writeNamed(@NotNull Map.Entry<String, CompoundBinaryTag> tag, @NotNull @NotNull Path path, @NotNull @NotNull BinaryTagIO.Compression compression) throws IOExceptionWrites a binary tag, with a name, topathwith acompressiontype.- Parameters:
tag- the named tag entry to writepath- the pathcompression- the compression type- Throws:
IOException- if an exception was encountered while reading the tag- Since:
- 4.4.0
-
writeNamed
default void writeNamed(@NotNull Map.Entry<String, CompoundBinaryTag> tag, @NotNull @NotNull 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:
tag- the named tag entry to writeoutput- the output stream- Throws:
IOException- if an exception was encountered while reading the tag- Since:
- 4.4.0
-
writeNamed
void writeNamed(@NotNull Map.Entry<String, CompoundBinaryTag> tag, @NotNull @NotNull OutputStream output, @NotNull @NotNull BinaryTagIO.Compression compression) throws IOExceptionWrites a binary tag, with a name, tooutputwith acompressiontype.- Parameters:
tag- the named tag entry to writeoutput- the output streamcompression- the compression type- Throws:
IOException- if an exception was encountered while reading the tag- Since:
- 4.4.0
-
writeNamed
void writeNamed(@NotNull Map.Entry<String, CompoundBinaryTag> tag, @NotNull @NotNull DataOutput output) throws IOExceptionWrites a binary tag, with a name, tooutput.- Parameters:
tag- the named tag entry to writeoutput- the output- Throws:
IOException- if an exception was encountered while reading the tag- Since:
- 4.4.0
-