Interface BinaryTagIO.Reader

    • Method Detail

      • read

        @NotNull
        default @NotNull CompoundBinaryTag read​(@NotNull
                                                @NotNull java.nio.file.Path path)
                                         throws java.io.IOException
        Reads a binary tag from path.

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

        Parameters:
        path - the path
        Returns:
        a binary tag
        Throws:
        java.io.IOException - if an exception was encountered while reading the tag
        Since:
        4.4.0
      • read

        @NotNull
        @NotNull CompoundBinaryTag read​(@NotNull
                                        @NotNull java.nio.file.Path path,
                                        @NotNull
                                        @NotNull BinaryTagIO.Compression compression)
                                 throws java.io.IOException
        Reads a binary tag from path with a compression type.
        Parameters:
        path - the path
        compression - the compression type
        Returns:
        a binary tag
        Throws:
        java.io.IOException - if an exception was encountered while reading the tag
        Since:
        4.4.0
      • read

        @NotNull
        default @NotNull CompoundBinaryTag read​(@NotNull
                                                @NotNull java.io.InputStream input)
                                         throws java.io.IOException
        Reads a binary tag from input.

        This is the equivalent of passing Compression#NONE as the second parameter to read(InputStream, Compression).

        Parameters:
        input - the input stream
        Returns:
        a binary tag
        Throws:
        java.io.IOException - if an exception was encountered while reading the tag
        Since:
        4.4.0
      • read

        @NotNull
        @NotNull CompoundBinaryTag read​(@NotNull
                                        @NotNull java.io.InputStream input,
                                        @NotNull
                                        @NotNull BinaryTagIO.Compression compression)
                                 throws java.io.IOException
        Reads a binary tag from input with a compression type.
        Parameters:
        input - the input stream
        compression - the compression type
        Returns:
        a binary tag
        Throws:
        java.io.IOException - if an exception was encountered while reading the tag
        Since:
        4.4.0
      • read

        @NotNull
        @NotNull CompoundBinaryTag read​(@NotNull
                                        @NotNull java.io.DataInput input)
                                 throws java.io.IOException
        Reads a binary tag from input.
        Parameters:
        input - the input stream
        Returns:
        a binary tag
        Throws:
        java.io.IOException - if an exception was encountered while reading the tag
        Since:
        4.4.0
      • readNamed

        default @NotNull java.util.Map.Entry<java.lang.String,​CompoundBinaryTag> readNamed​(@NotNull
                                                                                                 @NotNull java.nio.file.Path path)
                                                                                          throws java.io.IOException
        Reads a binary tag, with a name, from path.

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

        Parameters:
        path - the path
        Returns:
        a binary tag
        Throws:
        java.io.IOException - if an exception was encountered while reading the tag
        Since:
        4.4.0
      • readNamed

        @NotNull java.util.Map.Entry<java.lang.String,​CompoundBinaryTag> readNamed​(@NotNull
                                                                                         @NotNull java.nio.file.Path path,
                                                                                         @NotNull
                                                                                         @NotNull BinaryTagIO.Compression compression)
                                                                                  throws java.io.IOException
        Reads a binary tag, with a name, from path.
        Parameters:
        path - the path
        compression - the compression type
        Returns:
        a binary tag
        Throws:
        java.io.IOException - if an exception was encountered while reading the tag
        Since:
        4.4.0
      • readNamed

        default @NotNull java.util.Map.Entry<java.lang.String,​CompoundBinaryTag> readNamed​(@NotNull
                                                                                                 @NotNull java.io.InputStream input)
                                                                                          throws java.io.IOException
        Reads a binary tag, with a name, from input.

        This is the equivalent of passing Compression#NONE as the second parameter to readNamed(InputStream, Compression).

        Parameters:
        input - the input stream
        Returns:
        a binary tag
        Throws:
        java.io.IOException - if an exception was encountered while reading the tag
        Since:
        4.4.0
      • readNamed

        @NotNull java.util.Map.Entry<java.lang.String,​CompoundBinaryTag> readNamed​(@NotNull
                                                                                         @NotNull java.io.InputStream input,
                                                                                         @NotNull
                                                                                         @NotNull BinaryTagIO.Compression compression)
                                                                                  throws java.io.IOException
        Reads a binary tag, with a name, from input.
        Parameters:
        input - the input stream
        compression - the compression type
        Returns:
        a binary tag
        Throws:
        java.io.IOException - if an exception was encountered while reading the tag
        Since:
        4.4.0
      • readNamed

        @NotNull java.util.Map.Entry<java.lang.String,​CompoundBinaryTag> readNamed​(@NotNull
                                                                                         @NotNull java.io.DataInput input)
                                                                                  throws java.io.IOException
        Reads a binary tag, with a name, from input.
        Parameters:
        input - the input
        Returns:
        a binary tag
        Throws:
        java.io.IOException - if an exception was encountered while reading the tag
        Since:
        4.4.0