public class NbtIO
extends java.lang.Object
| Constructor and Description |
|---|
NbtIO() |
| Modifier and Type | Method and Description |
|---|---|
static INbtTag |
read(java.io.DataInput in,
NbtReadTracker readTracker)
Read a Nbt tag from a
DataInput. |
static INbtTag |
read(java.io.InputStream is,
boolean compressed,
NbtReadTracker readTracker)
Read a Nbt tag from an input stream.
|
static INbtTag |
readCompressedFile(java.io.File f,
NbtReadTracker readTracker)
Read a compressed Nbt tag from a file.
|
static INbtTag |
readFile(java.io.File f,
boolean compressed,
NbtReadTracker readTracker)
Read a Nbt tag from a file.
|
static INbtTag |
readFile(java.io.File f,
NbtReadTracker readTracker)
Read an uncompressed Nbt tag from a file.
|
static NbtHeader |
readNbtHeader(java.io.DataInput in,
NbtReadTracker readTracker)
Read a Nbt header from a
DataInput. |
static void |
write(java.io.DataOutput out,
java.lang.String name,
INbtTag tag)
Write a Nbt tag to a
DataOutput. |
static void |
write(java.io.OutputStream os,
java.lang.String name,
INbtTag tag,
boolean compressed)
Write a Nbt tag to an output stream.
|
static void |
writeCompressedFile(java.io.File f,
java.lang.String name,
INbtTag tag)
Write a compressed Nbt tag to a file.
|
static void |
writeFile(java.io.File f,
java.lang.String name,
INbtTag tag)
Write and uncompressed Nbt tag to a file.
|
static void |
writeFile(java.io.File f,
java.lang.String name,
INbtTag tag,
boolean compressed)
Write a Nbt tag to a file.
|
static void |
writeNbtHeader(java.io.DataOutput out,
NbtHeader header)
Write a Nbt header to a
DataOutput. |
public static INbtTag readFile(java.io.File f, NbtReadTracker readTracker) throws java.io.IOException
f - The file to read fromreadTracker - The read tracker to usejava.io.IOException - If an I/O error occurspublic static void writeFile(java.io.File f,
@Nonnull
java.lang.String name,
INbtTag tag)
throws java.io.IOException
f - The file to write toname - The name of the tag (should be "" if not needed)tag - The tag to writejava.io.IOException - If an I/O error occurspublic static INbtTag readCompressedFile(java.io.File f, NbtReadTracker readTracker) throws java.io.IOException
f - The file to read fromreadTracker - The read tracker to usejava.io.IOException - If an I/O error occurspublic static void writeCompressedFile(java.io.File f,
java.lang.String name,
INbtTag tag)
throws java.io.IOException
f - The file to write toname - The name of the tag (should be "" if not needed)tag - The tag to writejava.io.IOException - If an I/O error occurspublic static INbtTag readFile(java.io.File f, boolean compressed, NbtReadTracker readTracker) throws java.io.IOException
f - The file to read fromcompressed - Whether the file is compressed or notreadTracker - The read tracker to usejava.io.IOException - If an I/O error occurspublic static void writeFile(java.io.File f,
java.lang.String name,
INbtTag tag,
boolean compressed)
throws java.io.IOException
f - The file to write toname - The name of the tag (should be "" if not needed)tag - The tag to writecompressed - Whether the file should be compressed or notjava.io.IOException - If an I/O error occurspublic static INbtTag read(java.io.InputStream is, boolean compressed, NbtReadTracker readTracker) throws java.io.IOException
is - The input stream to read fromcompressed - Whether the input stream is compressed or notreadTracker - The read tracker to usejava.io.IOException - If an I/O error occurspublic static void write(java.io.OutputStream os,
java.lang.String name,
INbtTag tag,
boolean compressed)
throws java.io.IOException
os - The output stream to write toname - The name of the tag (should be "" if not needed)tag - The tag to writecompressed - Whether the output stream should be compressed or notjava.io.IOException - If an I/O error occurspublic static INbtTag read(java.io.DataInput in, NbtReadTracker readTracker) throws java.io.IOException
DataInput.in - The data input to read fromreadTracker - The read tracker to usejava.io.IOException - If an I/O error occurspublic static void write(java.io.DataOutput out,
java.lang.String name,
INbtTag tag)
throws java.io.IOException
DataOutput.out - The data output to write toname - The name of the tag (should be "" if not needed)tag - The tag to writejava.io.IOException - If an I/O error occurspublic static NbtHeader readNbtHeader(java.io.DataInput in, NbtReadTracker readTracker) throws java.io.IOException
DataInput.in - The data input to read fromreadTracker - The read tracker to usejava.io.IOException - If an I/O error occurspublic static void writeNbtHeader(java.io.DataOutput out,
NbtHeader header)
throws java.io.IOException
DataOutput.out - The data output to write toheader - The header to writejava.io.IOException - If an I/O error occurs