- Enclosing class:
BinaryTagIO
CompoundBinaryTag writer.- Since:
- 4.4.0
-
Method Summary
Modifier and TypeMethodDescriptionvoidwrite(CompoundBinaryTag tag, DataOutput output) Writes a binary tag tooutput.default voidwrite(CompoundBinaryTag tag, OutputStream output) Writes a binary tag tooutput.voidwrite(CompoundBinaryTag tag, OutputStream output, BinaryTagIO.Compression compression) Writes a binary tag tooutputwith acompressiontype.default voidwrite(CompoundBinaryTag tag, Path path) Writes a binary tag topathwith acompressiontype.voidwrite(CompoundBinaryTag tag, Path path, BinaryTagIO.Compression compression) Writes a binary tag topathwith acompressiontype.voidwriteNamed(Map.Entry<String, CompoundBinaryTag> tag, DataOutput output) Writes a binary tag, with a name, tooutput.default voidwriteNamed(Map.Entry<String, CompoundBinaryTag> tag, OutputStream output) Writes a binary tag, with a name, tooutput.voidwriteNamed(Map.Entry<String, CompoundBinaryTag> tag, OutputStream output, BinaryTagIO.Compression compression) Writes a binary tag, with a name, tooutputwith acompressiontype.default voidwriteNamed(Map.Entry<String, CompoundBinaryTag> tag, Path path) Writes a binary tag, with a name, topath.voidwriteNamed(Map.Entry<String, CompoundBinaryTag> tag, Path path, BinaryTagIO.Compression compression) Writes a binary tag, with a name, topathwith acompressiontype.voidwriteNameless(CompoundBinaryTag tag, DataOutput output) Writes a binary tag tooutput.default voidwriteNameless(CompoundBinaryTag tag, OutputStream output) Writes a binary tag tooutput.voidwriteNameless(CompoundBinaryTag tag, OutputStream output, BinaryTagIO.Compression compression) Writes a binary tag tooutputwith acompressiontype.default voidwriteNameless(CompoundBinaryTag tag, Path path) Writes a binary tag topathwith acompressiontype.voidwriteNameless(CompoundBinaryTag tag, Path path, BinaryTagIO.Compression compression) Writes a binary tag 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).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(CompoundBinaryTag tag, Path path, 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
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(CompoundBinaryTag tag, OutputStream output, 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
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
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(CompoundBinaryTag tag, Path path, 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
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(CompoundBinaryTag tag, OutputStream output, 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
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
Writes 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(Map.Entry<String, CompoundBinaryTag> tag, Path path, 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(Map.Entry<String, CompoundBinaryTag> tag, 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(Map.Entry<String, CompoundBinaryTag> tag, OutputStream output, 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
Writes 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
-