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 outputSteam) 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 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) private static TagreadUnnamedTag(DataInput input, NbtAccounter accounter) static voidwrite(CompoundTag compoundTag, DataOutput output) static voidwrite(CompoundTag compoundTag, Path path) static voidwriteAnyTag(Tag tag, DataOutput output) static voidwriteCompressed(CompoundTag compoundTag, OutputStream outputStream) Writes and compresses a compound tag to a GNU zipped file.static voidwriteCompressed(CompoundTag compoundTag, 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
- 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
public static void writeCompressed(CompoundTag compoundTag, OutputStream outputStream) throws IOException 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
-