public final class BinaryTagIO
extends java.lang.Object
Modifier and Type | Method and Description |
---|---|
static @NonNull com.github.steveice10.opennbt.tag.builtin.CompoundTag |
readCompressedInputStream(@NonNull java.io.InputStream input)
Reads a compound tag from an input stream using GZIP decompression.
|
static @NonNull com.github.steveice10.opennbt.tag.builtin.CompoundTag |
readCompressedPath(@NonNull java.nio.file.Path path)
Reads a compound tag from
path using GZIP decompression. |
static @NonNull com.github.steveice10.opennbt.tag.builtin.CompoundTag |
readDataInput(@NonNull java.io.DataInput input)
Reads a compound tag from
input . |
static @NonNull com.github.steveice10.opennbt.tag.builtin.CompoundTag |
readInputStream(@NonNull java.io.InputStream input)
Reads a compound tag from an input stream.
|
static @NonNull com.github.steveice10.opennbt.tag.builtin.CompoundTag |
readPath(@NonNull java.nio.file.Path path)
Reads a compound tag from
path . |
static @NonNull com.github.steveice10.opennbt.tag.builtin.CompoundTag |
readString(@NonNull java.lang.String input)
Reads a compound tag from a
String . |
static void |
writeCompressedOutputStream(@NonNull com.github.steveice10.opennbt.tag.builtin.CompoundTag tag,
@NonNull java.io.OutputStream output)
Writes a compound tag to an output stream using GZIP compression.
|
static void |
writeCompressedPath(@NonNull com.github.steveice10.opennbt.tag.builtin.CompoundTag tag,
@NonNull java.nio.file.Path path)
Writes a compound tag to
path using GZIP compression. |
static void |
writeDataOutput(@NonNull com.github.steveice10.opennbt.tag.builtin.CompoundTag tag,
@NonNull java.io.DataOutput output)
Writes a compound tag to
output . |
static void |
writeOutputStream(@NonNull com.github.steveice10.opennbt.tag.builtin.CompoundTag tag,
@NonNull java.io.OutputStream output)
Writes a compound tag to an output stream.
|
static void |
writePath(@NonNull com.github.steveice10.opennbt.tag.builtin.CompoundTag tag,
@NonNull java.nio.file.Path path)
Writes a compound tag to
path . |
static @NonNull java.lang.String |
writeString(@NonNull com.github.steveice10.opennbt.tag.builtin.CompoundTag tag)
Writes a compound tag to a
String . |
public static @NonNull com.github.steveice10.opennbt.tag.builtin.CompoundTag readPath(@NonNull java.nio.file.Path path) throws java.io.IOException
path
.path
- the pathjava.io.IOException
- if an exception was encountered while reading a compound tagpublic static @NonNull com.github.steveice10.opennbt.tag.builtin.CompoundTag readInputStream(@NonNull java.io.InputStream input) throws java.io.IOException
input
- the input streamjava.io.IOException
- if an exception was encountered while reading a compound tagpublic static @NonNull com.github.steveice10.opennbt.tag.builtin.CompoundTag readCompressedPath(@NonNull java.nio.file.Path path) throws java.io.IOException
path
using GZIP decompression.path
- the pathjava.io.IOException
- if an exception was encountered while reading a compound tagpublic static @NonNull com.github.steveice10.opennbt.tag.builtin.CompoundTag readCompressedInputStream(@NonNull java.io.InputStream input) throws java.io.IOException
input
- the input streamjava.io.IOException
- if an exception was encountered while reading a compound tagpublic static @NonNull com.github.steveice10.opennbt.tag.builtin.CompoundTag readDataInput(@NonNull java.io.DataInput input) throws java.io.IOException
input
.input
- the inputjava.io.IOException
- if an exception was encountered while reading a compound tagpublic static void writePath(@NonNull com.github.steveice10.opennbt.tag.builtin.CompoundTag tag, @NonNull java.nio.file.Path path) throws java.io.IOException
path
.tag
- the compound tagpath
- the pathjava.io.IOException
- if an exception was encountered while writing the compound tagpublic static void writeOutputStream(@NonNull com.github.steveice10.opennbt.tag.builtin.CompoundTag tag, @NonNull java.io.OutputStream output) throws java.io.IOException
tag
- the compound tagoutput
- the output streamjava.io.IOException
- if an exception was encountered while writing the compound tagpublic static void writeCompressedPath(@NonNull com.github.steveice10.opennbt.tag.builtin.CompoundTag tag, @NonNull java.nio.file.Path path) throws java.io.IOException
path
using GZIP compression.tag
- the compound tagpath
- the pathjava.io.IOException
- if an exception was encountered while writing the compound tagpublic static void writeCompressedOutputStream(@NonNull com.github.steveice10.opennbt.tag.builtin.CompoundTag tag, @NonNull java.io.OutputStream output) throws java.io.IOException
tag
- the compound tagoutput
- the output streamjava.io.IOException
- if an exception was encountered while writing the compound tagpublic static void writeDataOutput(@NonNull com.github.steveice10.opennbt.tag.builtin.CompoundTag tag, @NonNull java.io.DataOutput output) throws java.io.IOException
output
.tag
- the compound tagoutput
- the outputjava.io.IOException
- if an exception was encountered while writing the compound tagpublic static @NonNull com.github.steveice10.opennbt.tag.builtin.CompoundTag readString(@NonNull java.lang.String input) throws java.io.IOException
String
.input
- the stringjava.io.IOException
- if an exception was encountered while reading a compound tagpublic static @NonNull java.lang.String writeString(@NonNull com.github.steveice10.opennbt.tag.builtin.CompoundTag tag) throws java.io.IOException
String
.tag
- the compound tagjava.io.IOException
- if an exception was encountered while writing the compound tag