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 DataOutputStreamprivate static DataInputStreamstatic voidparse(DataInput input, StreamTagVisitor output, NbtAccounter accounter) static voidparseCompressed(InputStream in, StreamTagVisitor output, NbtAccounter accounter) static voidparseCompressed(Path file, StreamTagVisitor output, 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 in, NbtAccounter accounter) static CompoundTagreadCompressed(Path file, 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 file) static voidwriteAnyTag(Tag tag, DataOutput output) static voidwriteCompressed(CompoundTag tag, OutputStream out) Writes and compresses a compound tag to a GNU zipped file.static voidwriteCompressed(CompoundTag tag, Path file) 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
- Throws:
IOException
-
createCompressorStream
- Throws:
IOException
-
readCompressed
- Throws:
IOException
-
parseCompressed
public static void parseCompressed(Path file, StreamTagVisitor output, NbtAccounter accounter) throws IOException - Throws:
IOException
-
parseCompressed
public static void parseCompressed(InputStream in, StreamTagVisitor output, 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 output, NbtAccounter accounter) throws IOException - Throws:
IOException
-
readAnyTag
- Throws:
IOException
-
writeAnyTag
- Throws:
IOException
-
writeUnnamedTag
- Throws:
IOException
-
writeUnnamedTagWithFallback
- Throws:
IOException
-
readUnnamedTag
- Throws:
IOException
-
readTagSafe
-