public final class NbtOutputStream extends Object implements Closeable
Tag objects to an underlying
OutputStream.
The NBT format was created by Markus Persson, and the specification may be found at http://www.minecraft.net/docs/NBT.txt.
| Constructor and Description |
|---|
NbtOutputStream(OutputStream os)
Creates a new NBTOutputStream, which will write data to the specified underlying output
stream.
|
NbtOutputStream(OutputStream os,
boolean compressed)
Creates a new NBTOutputStream, which will write data to the specified underlying output
stream.
|
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
void |
writeTag(Tag tag)
Write a tag with a blank name (the root tag) to the stream.
|
public NbtOutputStream(OutputStream os) throws IOException
os - The output stream.IOException - if an I/O error occurs.public NbtOutputStream(OutputStream os, boolean compressed) throws IOException
os - The output stream.compressed - A flag that indicates if the output should be compressed.IOException - if an I/O error occurs.public void writeTag(Tag tag) throws IOException
tag - The tag to write.IOException - if an I/O error occurs.public void close()
throws IOException
close in interface Closeableclose in interface AutoCloseableIOExceptionCopyright © 2021. All rights reserved.