public class SNBTIO extends Object
| Modifier and Type | Class and Description |
|---|---|
static class |
SNBTIO.StringifiedNBTReader |
static class |
SNBTIO.StringifiedNBTWriter |
| Constructor and Description |
|---|
SNBTIO() |
| Modifier and Type | Method and Description |
|---|---|
static CompoundTag |
readFile(File file)
Reads the stringified CompoundTag from the given file.
|
static CompoundTag |
readFile(String path)
Reads stringified root CompoundTag from the given file.
|
static Tag |
readTag(InputStream in)
Reads a stringified NBT tag.
|
static void |
writeFile(CompoundTag tag,
File file)
Writes the given root CompoundTag to the given file as stringified NBT.
|
static void |
writeFile(CompoundTag tag,
File file,
boolean linebreak)
Writes the given root CompoundTag to the given file as stringified NBT.
|
static void |
writeFile(CompoundTag tag,
String path)
Writes the given root CompoundTag to the given file as stringified NBT.
|
static void |
writeFile(CompoundTag tag,
String path,
boolean linebreak)
Writes the given root CompoundTag to the given file as stringified NBT.
|
static void |
writeTag(OutputStream out,
Tag tag)
Writes a stringified NBT tag.
|
static void |
writeTag(OutputStream out,
Tag tag,
boolean linebreak)
Writes a stringified NBT tag.
|
public static CompoundTag readFile(String path) throws IOException
path - Path of the file.IOException - If an I/O error occurs.public static CompoundTag readFile(File file) throws IOException
file - File to read from.IOException - If an I/O error occurs.public static void writeFile(CompoundTag tag, String path) throws IOException
tag - Tag to write.path - Path to write to.IOException - If an I/O error occurs.public static void writeFile(CompoundTag tag, File file) throws IOException
tag - Tag to write.file - File to write to.IOException - If an I/O error occurs.public static void writeFile(CompoundTag tag, String path, boolean linebreak) throws IOException
tag - Tag to write.path - Path to write to.linebreak - Whether the SNBT file should be formated with line breaks or as a single line.IOException - If an I/O error occurs.public static void writeFile(CompoundTag tag, File file, boolean linebreak) throws IOException
tag - Tag to write.file - File to write to.linebreak - Whether the SNBT file should be formated with line breaks or as a single line.IOException - If an I/O error occurs.public static Tag readTag(InputStream in) throws IOException
in - Input stream to read from.IOException - If an I/O error occurs.public static void writeTag(OutputStream out, Tag tag) throws IOException
out - Output stream to write to.tag - Tag to write.IOException - If an I/O error occurs.public static void writeTag(OutputStream out, Tag tag, boolean linebreak) throws IOException
out - Output stream to write to.tag - Tag to write.linebreak - Whether the SNBT should be formated with line breaks or as a single line.IOException - If an I/O error occurs.Copyright © 2021. All rights reserved.