blob: ecfc744b7140b97df02bb031d63e35dae825e614 [file] [log] [blame] [raw]
package net.querz.nbt;
import java.io.Closeable;
import java.io.DataOutputStream;
import java.io.IOException;
import java.io.OutputStream;
public class NBTOutputStream implements Closeable {
protected final DataOutputStream dos;
public NBTOutputStream(OutputStream os) {
dos = new DataOutputStream(os);
}
public void writeTag(Tag tag) throws Exception {
tag.serializeTag(this);
}
@Override
public void close() throws IOException {
dos.close();
}
public DataOutputStream getDataOutputStream() {
return dos;
}
}