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 DataOutputStream
createCompressorStream
(OutputStream pOutputSteam) private static DataInputStream
createDecompressorStream
(InputStream pZippedStream) static void
parse
(DataInput pInput, StreamTagVisitor pVisitor, NbtAccounter pAccounter) static void
parseCompressed
(InputStream pZippedStream, StreamTagVisitor pVisitor, NbtAccounter pAccounter) static void
parseCompressed
(Path pPath, StreamTagVisitor pVisitor, NbtAccounter pAccounter) static CompoundTag
Reads a compound tag from a file.static CompoundTag
read
(DataInput pInput, NbtAccounter pAccounter) Reads a compound tag from a file.static CompoundTag
static Tag
readAnyTag
(DataInput pInput, NbtAccounter pAccounter) static CompoundTag
readCompressed
(InputStream pZippedStream, NbtAccounter pAccounter) static CompoundTag
readCompressed
(Path pPath, NbtAccounter pAccounter) private static Tag
readTagSafe
(DataInput pInput, NbtAccounter pAccounter, byte pType) private static Tag
readUnnamedTag
(DataInput pInput, NbtAccounter pAccounter) static void
write
(CompoundTag pCompoundTag, DataOutput pOutput) static void
write
(CompoundTag pCompoundTag, Path pPath) static void
writeAnyTag
(Tag pTag, DataOutput pOutput) static void
writeCompressed
(CompoundTag pCompoundTag, OutputStream pOutputStream) Writes and compresses a compound tag to a GNU zipped file.static void
writeCompressed
(CompoundTag pCompoundTag, Path pPath) static void
writeUnnamedTag
(Tag pTag, DataOutput pOutput) static void
writeUnnamedTagWithFallback
(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 theaccounter
IOException
-
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
-