Interface BinaryTagIO.Writer

    • 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 to path with a compression type.

        This is the equivalent of passing Compression#NONE as the second parameter to write(CompoundBinaryTag, Path, Compression).

        Parameters:
        tag - the tag to write
        path - 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 to path with a compression type.
        Parameters:
        tag - the tag to write
        path - the path
        compression - 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 to output.

        This is the equivalent of passing BinaryTagIO.Compression.NONE as the second parameter to write(CompoundBinaryTag, OutputStream, Compression).

        Parameters:
        tag - the tag to write
        output - 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 to output with a compression type.
        Parameters:
        tag - the tag to write
        output - the output stream
        compression - 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 to output.
        Parameters:
        tag - the tag to write
        output - the output
        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.nio.file.Path path)
                         throws java.io.IOException
        Writes a binary tag, with a name, to path.

        This is the equivalent of passing Compression#NONE as the second parameter to write(CompoundBinaryTag, Path, Compression).

        Parameters:
        tag - the named tag entry to write
        path - 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, to path with a compression type.
        Parameters:
        tag - the named tag entry to write
        path - the path
        compression - 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, to output.

        This is the equivalent of passing Compression#NONE as the second parameter to write(CompoundBinaryTag, OutputStream, Compression).

        Parameters:
        tag - the named tag entry to write
        output - 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, to output with a compression type.
        Parameters:
        tag - the named tag entry to write
        output - the output stream
        compression - 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, to output.
        Parameters:
        tag - the named tag entry to write
        output - the output
        Throws:
        java.io.IOException - if an exception was encountered while reading the tag
        Since:
        4.4.0