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 pOutputSteam) private static DataInputStreamcreateDecompressorStream(InputStream pZippedStream) static voidparse(DataInput pInput, StreamTagVisitor pVisitor, NbtAccounter pAccounter) static voidparseCompressed(InputStream pZippedStream, StreamTagVisitor pVisitor, NbtAccounter pAccounter) static voidparseCompressed(Path pPath, StreamTagVisitor pVisitor, NbtAccounter pAccounter) static CompoundTagReads a compound tag from a file.static CompoundTagread(DataInput pInput, NbtAccounter pAccounter) Reads a compound tag from a file.static CompoundTagstatic TagreadAnyTag(DataInput pInput, NbtAccounter pAccounter) static CompoundTagreadCompressed(InputStream pZippedStream, NbtAccounter pAccounter) static CompoundTagreadCompressed(Path pPath, NbtAccounter pAccounter) private static TagreadTagSafe(DataInput pInput, NbtAccounter pAccounter, byte pType) static TagreadUnnamedTag(DataInput pInput, NbtAccounter pAccounter) static voidwrite(CompoundTag pCompoundTag, DataOutput pOutput) static voidwrite(CompoundTag pCompoundTag, Path pPath) static voidwriteAnyTag(Tag pTag, DataOutput pOutput) static voidwriteCompressed(CompoundTag pCompoundTag, OutputStream pOutputStream) Writes and compresses a compound tag to a GNU zipped file.static voidwriteCompressed(CompoundTag pCompoundTag, Path pPath) static voidwriteUnnamedTag(Tag pTag, DataOutput pOutput) static voidwriteUnnamedTagWithFallback(Tag pTag, DataOutput pOutput)
-
Field Details
-
SYNC_OUTPUT_OPTIONS
-
-
Constructor Details
-
NbtIo
public NbtIo()
-
-
Method Details
-
readCompressed
- Throws:
IOException
-
createDecompressorStream
private static DataInputStream createDecompressorStream(InputStream pZippedStream) throws IOException - Throws:
IOException
-
createCompressorStream
private static DataOutputStream createCompressorStream(OutputStream pOutputSteam) throws IOException - Throws:
IOException
-
readCompressed
public static CompoundTag readCompressed(InputStream pZippedStream, NbtAccounter pAccounter) throws IOException - Throws:
IOException
-
parseCompressed
public static void parseCompressed(Path pPath, StreamTagVisitor pVisitor, NbtAccounter pAccounter) throws IOException - Throws:
IOException
-
parseCompressed
public static void parseCompressed(InputStream pZippedStream, StreamTagVisitor pVisitor, NbtAccounter pAccounter) throws IOException - Throws:
IOException
-
writeCompressed
- Throws:
IOException
-
writeCompressed
public static void writeCompressed(CompoundTag pCompoundTag, OutputStream pOutputStream) 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 pInput, StreamTagVisitor pVisitor, NbtAccounter pAccounter) throws IOException - Throws:
IOException
-
readAnyTag
- Throws:
IOException
-
writeAnyTag
- Throws:
IOException
-
writeUnnamedTag
- Throws:
IOException
-
writeUnnamedTagWithFallback
- Throws:
IOException
-
readUnnamedTag
- Throws:
IOException
-
readTagSafe
-