Package net.minecraft.nbt
Class NbtIo
java.lang.Object
net.minecraft.nbt.NbtIo
-
Nested Class Summary
Nested Classes -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate static DataOutputStreamcreateCompressorStream(OutputStream outputStream) private static DataInputStreamcreateDecompressorStream(InputStream zippedStream) static voidparse(DataInput input, StreamTagVisitor visitor, NbtAccounter accounter) static voidparseCompressed(InputStream zippedStream, StreamTagVisitor visitor, NbtAccounter accounter) static voidparseCompressed(Path path, StreamTagVisitor visitor, NbtAccounter accounter) static CompoundTagReads a compound tag from a file.static CompoundTagread(DataInput input, NbtAccounter accounter) Reads a compound tag from a file.static @Nullable CompoundTagstatic TagreadAnyTag(DataInput input, NbtAccounter accounter) static CompoundTagreadCompressed(InputStream zippedStream, NbtAccounter accounter) static CompoundTagreadCompressed(Path path, NbtAccounter accounter) private static TagreadTagSafe(DataInput input, NbtAccounter accounter, byte type) static TagreadUnnamedTag(DataInput input, NbtAccounter accounter) static voidwrite(CompoundTag tag, DataOutput output) static voidwrite(CompoundTag tag, Path path) static voidwriteAnyTag(Tag tag, DataOutput output) static voidwriteCompressed(CompoundTag tag, OutputStream outputStream) Writes and compresses a compound tag to a GNU zipped file.static voidwriteCompressed(CompoundTag tag, Path path) static voidwriteUnnamedTag(Tag tag, DataOutput output) static voidwriteUnnamedTagWithFallback(Tag tag, DataOutput output)
-
Field Details
-
SYNC_OUTPUT_OPTIONS
-
-
Constructor Details
-
NbtIo
public NbtIo()
-
-
Method Details
-
readCompressed
- Throws:
IOException
-
createDecompressorStream
private static DataInputStream createDecompressorStream(InputStream zippedStream) throws IOException - Throws:
IOException
-
createCompressorStream
private static DataOutputStream createCompressorStream(OutputStream outputStream) throws IOException - Throws:
IOException
-
readCompressed
public static CompoundTag readCompressed(InputStream zippedStream, NbtAccounter accounter) throws IOException - Throws:
IOException
-
parseCompressed
public static void parseCompressed(Path path, StreamTagVisitor visitor, NbtAccounter accounter) throws IOException - Throws:
IOException
-
parseCompressed
public static void parseCompressed(InputStream zippedStream, StreamTagVisitor visitor, NbtAccounter accounter) throws IOException - Throws:
IOException
-
writeCompressed
- Throws:
IOException
-
writeCompressed
Writes and compresses a compound tag to a GNU zipped file.- Throws:
IOException- See Also:
-
write
- Throws:
IOException
-
read
- Throws:
IOException
-
read
Reads a compound tag from a file. The size of the file can be infinite.- Throws:
IOException
-
read
Reads a compound tag from a file. The size of the file is limited by theaccounter.- Throws:
RuntimeException- if the size of the file is larger than the maximum amount of bytes specified by theaccounterIOException
-
write
- Throws:
IOException
-
parse
public static void parse(DataInput input, StreamTagVisitor visitor, NbtAccounter accounter) throws IOException - Throws:
IOException
-
readAnyTag
- Throws:
IOException
-
writeAnyTag
- Throws:
IOException
-
writeUnnamedTag
- Throws:
IOException
-
writeUnnamedTagWithFallback
- Throws:
IOException
-
readUnnamedTag
- Throws:
IOException
-
readTagSafe
-