Interface BinaryTagIO.Writer
-
- Enclosing class:
- BinaryTagIO
public static interface BinaryTagIO.Writer
CompoundBinaryTag
writer.- Since:
- 4.4.0
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description void
write(@NotNull CompoundBinaryTag tag, @NotNull java.io.DataOutput output)
Writes a binary tag tooutput
.default void
write(@NotNull CompoundBinaryTag tag, @NotNull java.io.OutputStream output)
Writes a binary tag tooutput
.void
write(@NotNull CompoundBinaryTag tag, @NotNull java.io.OutputStream output, @NotNull BinaryTagIO.Compression compression)
Writes a binary tag tooutput
with acompression
type.default void
write(@NotNull CompoundBinaryTag tag, @NotNull java.nio.file.Path path)
Writes a binary tag topath
with acompression
type.void
write(@NotNull CompoundBinaryTag tag, @NotNull java.nio.file.Path path, @NotNull BinaryTagIO.Compression compression)
Writes a binary tag topath
with acompression
type.void
writeNamed(@NotNull java.util.Map.Entry<java.lang.String,CompoundBinaryTag> tag, @NotNull java.io.DataOutput output)
Writes a binary tag, with a name, tooutput
.default void
writeNamed(@NotNull java.util.Map.Entry<java.lang.String,CompoundBinaryTag> tag, @NotNull java.io.OutputStream output)
Writes a binary tag, with a name, tooutput
.void
writeNamed(@NotNull java.util.Map.Entry<java.lang.String,CompoundBinaryTag> tag, @NotNull java.io.OutputStream output, @NotNull BinaryTagIO.Compression compression)
Writes a binary tag, with a name, tooutput
with acompression
type.default void
writeNamed(@NotNull java.util.Map.Entry<java.lang.String,CompoundBinaryTag> tag, @NotNull java.nio.file.Path path)
Writes a binary tag, with a name, topath
.void
writeNamed(@NotNull java.util.Map.Entry<java.lang.String,CompoundBinaryTag> tag, @NotNull java.nio.file.Path path, @NotNull BinaryTagIO.Compression compression)
Writes a binary tag, with a name, topath
with acompression
type.void
writeNameless(@NotNull CompoundBinaryTag tag, @NotNull java.io.DataOutput output)
Writes a binary tag tooutput
.default void
writeNameless(@NotNull CompoundBinaryTag tag, @NotNull java.io.OutputStream output)
Writes a binary tag tooutput
.void
writeNameless(@NotNull CompoundBinaryTag tag, @NotNull java.io.OutputStream output, @NotNull BinaryTagIO.Compression compression)
Writes a binary tag tooutput
with acompression
type.default void
writeNameless(@NotNull CompoundBinaryTag tag, @NotNull java.nio.file.Path path)
Writes a binary tag topath
with acompression
type.void
writeNameless(@NotNull CompoundBinaryTag tag, @NotNull java.nio.file.Path path, @NotNull BinaryTagIO.Compression compression)
Writes a binary tag topath
with acompression
type.
-
-
-
Method Detail
-
write
default void write(@NotNull @NotNull CompoundBinaryTag tag, @NotNull @NotNull java.nio.file.Path path) throws java.io.IOException
Writes a binary tag topath
with acompression
type.This is the equivalent of passing
Compression#NONE
as the second parameter towrite(CompoundBinaryTag, Path, Compression)
.An empty root name is written.
- Parameters:
tag
- the tag to writepath
- the path- Throws:
java.io.IOException
- if an exception was encountered while reading the tag- Since:
- 4.4.0
-
write
void write(@NotNull @NotNull CompoundBinaryTag tag, @NotNull @NotNull java.nio.file.Path path, @NotNull @NotNull BinaryTagIO.Compression compression) throws java.io.IOException
Writes a binary tag topath
with acompression
type.An empty root name is written.
- Parameters:
tag
- the tag to writepath
- the pathcompression
- the compression type- Throws:
java.io.IOException
- if an exception was encountered while reading the tag- Since:
- 4.4.0
-
write
default void write(@NotNull @NotNull CompoundBinaryTag tag, @NotNull @NotNull java.io.OutputStream output) throws java.io.IOException
Writes a binary tag tooutput
.This is the equivalent of passing
BinaryTagIO.Compression.NONE
as the second parameter towrite(CompoundBinaryTag, OutputStream, Compression)
.An empty root name is written.
- Parameters:
tag
- the tag to writeoutput
- the output stream- Throws:
java.io.IOException
- if an exception was encountered while reading the tag- Since:
- 4.4.0
-
write
void write(@NotNull @NotNull CompoundBinaryTag tag, @NotNull @NotNull java.io.OutputStream output, @NotNull @NotNull BinaryTagIO.Compression compression) throws java.io.IOException
Writes a binary tag tooutput
with acompression
type.An empty root name is written.
- Parameters:
tag
- the tag to writeoutput
- the output streamcompression
- the compression type- Throws:
java.io.IOException
- if an exception was encountered while reading the tag- Since:
- 4.4.0
-
write
void write(@NotNull @NotNull CompoundBinaryTag tag, @NotNull @NotNull java.io.DataOutput output) throws java.io.IOException
Writes a binary tag tooutput
.An empty root name is written.
- Parameters:
tag
- the tag to writeoutput
- the output- Throws:
java.io.IOException
- if an exception was encountered while reading the tag- Since:
- 4.4.0
-
writeNameless
default void writeNameless(@NotNull @NotNull CompoundBinaryTag tag, @NotNull @NotNull java.nio.file.Path path) throws java.io.IOException
Writes a binary tag topath
with acompression
type.This is the equivalent of passing
Compression#NONE
as the second parameter towrite(CompoundBinaryTag, Path, Compression)
.Doesn't write a root name to the
Path
at all, to match the wire protocol in modern game versions.- Parameters:
tag
- the tag to writepath
- the path- Throws:
java.io.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 java.nio.file.Path path, @NotNull @NotNull BinaryTagIO.Compression compression) throws java.io.IOException
Writes a binary tag topath
with acompression
type.Doesn't write a root name to the
Path
at all, to match the wire protocol in modern game versions.- Parameters:
tag
- the tag to writepath
- the pathcompression
- the compression type- Throws:
java.io.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 java.io.OutputStream output) throws java.io.IOException
Writes a binary tag tooutput
.This is the equivalent of passing
BinaryTagIO.Compression.NONE
as the second parameter towrite(CompoundBinaryTag, OutputStream, Compression)
.Doesn't write a root name to the
OutputStream
at all, to match the wire protocol in modern game versions.- Parameters:
tag
- the tag to writeoutput
- the output stream- Throws:
java.io.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 java.io.OutputStream output, @NotNull @NotNull BinaryTagIO.Compression compression) throws java.io.IOException
Writes a binary tag tooutput
with acompression
type.Doesn't write a root name to the
OutputStream
at all, to match the wire protocol in modern game versions.- Parameters:
tag
- the tag to writeoutput
- the output streamcompression
- the compression type- Throws:
java.io.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 java.io.DataOutput output) throws java.io.IOException
Writes a binary tag tooutput
.Doesn't write a root name to the
DataOutput
at all, to match the wire protocol in modern game versions.- Parameters:
tag
- the tag to writeoutput
- the output- Throws:
java.io.IOException
- if an exception was encountered while reading the tag- Since:
- 4.15.0
- Since Minecraft:
- 1.20.2
-
writeNamed
default void writeNamed(@NotNull java.util.Map.Entry<java.lang.String,CompoundBinaryTag> tag, @NotNull @NotNull java.nio.file.Path path) throws java.io.IOException
Writes a binary tag, with a name, topath
.This is the equivalent of passing
Compression#NONE
as the second parameter towrite(CompoundBinaryTag, Path, Compression)
.- Parameters:
tag
- the named tag entry to writepath
- the path- Throws:
java.io.IOException
- if an exception was encountered while reading the tag- Since:
- 4.4.0
-
writeNamed
void writeNamed(@NotNull java.util.Map.Entry<java.lang.String,CompoundBinaryTag> tag, @NotNull @NotNull java.nio.file.Path path, @NotNull @NotNull BinaryTagIO.Compression compression) throws java.io.IOException
Writes a binary tag, with a name, topath
with acompression
type.- Parameters:
tag
- the named tag entry to writepath
- the pathcompression
- the compression type- Throws:
java.io.IOException
- if an exception was encountered while reading the tag- Since:
- 4.4.0
-
writeNamed
default void writeNamed(@NotNull java.util.Map.Entry<java.lang.String,CompoundBinaryTag> tag, @NotNull @NotNull java.io.OutputStream output) throws java.io.IOException
Writes a binary tag, with a name, tooutput
.This is the equivalent of passing
Compression#NONE
as the second parameter towrite(CompoundBinaryTag, OutputStream, Compression)
.- Parameters:
tag
- the named tag entry to writeoutput
- the output stream- Throws:
java.io.IOException
- if an exception was encountered while reading the tag- Since:
- 4.4.0
-
writeNamed
void writeNamed(@NotNull java.util.Map.Entry<java.lang.String,CompoundBinaryTag> tag, @NotNull @NotNull java.io.OutputStream output, @NotNull @NotNull BinaryTagIO.Compression compression) throws java.io.IOException
Writes a binary tag, with a name, tooutput
with acompression
type.- Parameters:
tag
- the named tag entry to writeoutput
- the output streamcompression
- the compression type- Throws:
java.io.IOException
- if an exception was encountered while reading the tag- Since:
- 4.4.0
-
writeNamed
void writeNamed(@NotNull java.util.Map.Entry<java.lang.String,CompoundBinaryTag> tag, @NotNull @NotNull java.io.DataOutput output) throws java.io.IOException
Writes a binary tag, with a name, tooutput
.- Parameters:
tag
- the named tag entry to writeoutput
- the output- Throws:
java.io.IOException
- if an exception was encountered while reading the tag- Since:
- 4.4.0
-
-