Package com.sk89q.jnbt
Class NBTOutputStream
java.lang.Object
java.io.OutputStream
com.sk89q.jnbt.NBTOutputStream
- All Implemented Interfaces:
Closeable
,DataOutput
,Flushable
,AutoCloseable
@Deprecated(forRemoval=true)
public final class NBTOutputStream
extends OutputStream
implements Closeable, DataOutput
Deprecated, for removal: This API element is subject to removal in a future version.
This class writes NBT, or Named Binary Tag
Tag
objects to an underlying OutputStream
.
The NBT format was created by Markus Persson, and the specification may be found at https://minecraft.gamepedia.com/NBT_format.
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic interface
Deprecated, for removal: This API element is subject to removal in a future version. -
Constructor Summary
ConstructorDescriptionDeprecated, for removal: This API element is subject to removal in a future version.Deprecated, for removal: This API element is subject to removal in a future version.Deprecated, for removal: This API element is subject to removal in a future version.Creates a newNBTOutputStream
, which will write data to the specified underlying output stream.NBTOutputStream
(OutputStream os, boolean littleEndian) Deprecated, for removal: This API element is subject to removal in a future version. -
Method Summary
Modifier and TypeMethodDescriptionvoid
close()
Deprecated, for removal: This API element is subject to removal in a future version.void
flush()
Deprecated, for removal: This API element is subject to removal in a future version.Flush output.Deprecated, for removal: This API element is subject to removal in a future version.void
write
(byte[] b) Deprecated, for removal: This API element is subject to removal in a future version.void
write
(byte[] b, int off, int len) Deprecated, for removal: This API element is subject to removal in a future version.void
write
(int b) Deprecated, for removal: This API element is subject to removal in a future version.void
writeBoolean
(boolean v) Deprecated, for removal: This API element is subject to removal in a future version.void
writeByte
(int v) Deprecated, for removal: This API element is subject to removal in a future version.void
writeBytes
(String s) Deprecated, for removal: This API element is subject to removal in a future version.void
writeChar
(int v) Deprecated, for removal: This API element is subject to removal in a future version.void
writeChars
(String s) Deprecated, for removal: This API element is subject to removal in a future version.void
writeDouble
(double v) Deprecated, for removal: This API element is subject to removal in a future version.void
Deprecated, for removal: This API element is subject to removal in a future version.void
writeFloat
(float v) Deprecated, for removal: This API element is subject to removal in a future version.void
writeInt
(int v) Deprecated, for removal: This API element is subject to removal in a future version.void
writeLazyCompoundTag
(String name, NBTOutputStream.LazyWrite next) Deprecated, for removal: This API element is subject to removal in a future version.void
writeLong
(long v) Deprecated, for removal: This API element is subject to removal in a future version.void
writeNamedEmptyList
(String name) Deprecated, for removal: This API element is subject to removal in a future version.void
writeNamedTag
(String name, byte value) Deprecated, for removal: This API element is subject to removal in a future version.void
writeNamedTag
(String name, byte[] bytes) Deprecated, for removal: This API element is subject to removal in a future version.void
writeNamedTag
(String name, int value) Deprecated, for removal: This API element is subject to removal in a future version.void
writeNamedTag
(String name, int[] data) Deprecated, for removal: This API element is subject to removal in a future version.void
writeNamedTag
(String name, long value) Deprecated, for removal: This API element is subject to removal in a future version.void
writeNamedTag
(String name, short value) Deprecated, for removal: This API element is subject to removal in a future version.void
writeNamedTag
(String name, Tag<?, ?> tag) Deprecated, for removal: This API element is subject to removal in a future version.Writes a tag.void
writeNamedTag
(String name, String value) Deprecated, for removal: This API element is subject to removal in a future version.void
writeNamedTagName
(String name, int type) Deprecated, for removal: This API element is subject to removal in a future version.void
writeShort
(int v) Deprecated, for removal: This API element is subject to removal in a future version.void
Deprecated, for removal: This API element is subject to removal in a future version.void
writeTagPayload
(Tag tag) Deprecated, for removal: This API element is subject to removal in a future version.Writes tag payload.void
Deprecated, for removal: This API element is subject to removal in a future version.Methods inherited from class java.io.OutputStream
nullOutputStream
-
Constructor Details
-
NBTOutputStream
Deprecated, for removal: This API element is subject to removal in a future version.Creates a newNBTOutputStream
, which will write data to the specified underlying output stream.- Parameters:
os
- The output stream.- Throws:
IOException
- if an I/O error occurs.
-
NBTOutputStream
Deprecated, for removal: This API element is subject to removal in a future version. -
NBTOutputStream
Deprecated, for removal: This API element is subject to removal in a future version. -
NBTOutputStream
Deprecated, for removal: This API element is subject to removal in a future version.- Throws:
IOException
-
-
Method Details
-
getOutputStream
Deprecated, for removal: This API element is subject to removal in a future version. -
writeNamedTag
Deprecated, for removal: This API element is subject to removal in a future version.Writes a tag.- Parameters:
tag
- The tag to write.- Throws:
IOException
- if an I/O error occurs.
-
writeNamedTag
Deprecated, for removal: This API element is subject to removal in a future version.- Throws:
IOException
-
writeNamedTag
Deprecated, for removal: This API element is subject to removal in a future version.- Throws:
IOException
-
writeNamedTag
Deprecated, for removal: This API element is subject to removal in a future version.- Throws:
IOException
-
writeNamedTag
Deprecated, for removal: This API element is subject to removal in a future version.- Throws:
IOException
-
writeNamedTag
Deprecated, for removal: This API element is subject to removal in a future version.- Throws:
IOException
-
writeNamedTag
Deprecated, for removal: This API element is subject to removal in a future version.- Throws:
IOException
-
writeNamedTag
Deprecated, for removal: This API element is subject to removal in a future version.- Throws:
IOException
-
writeNamedEmptyList
Deprecated, for removal: This API element is subject to removal in a future version.- Throws:
IOException
-
writeNamedTagName
Deprecated, for removal: This API element is subject to removal in a future version.- Throws:
IOException
-
writeLazyCompoundTag
Deprecated, for removal: This API element is subject to removal in a future version.- Throws:
IOException
-
writeTag
Deprecated, for removal: This API element is subject to removal in a future version.- Throws:
IOException
-
writeEndTag
Deprecated, for removal: This API element is subject to removal in a future version.- Throws:
IOException
-
writeTagPayload
Deprecated, for removal: This API element is subject to removal in a future version.Writes tag payload.- Parameters:
tag
- The tag.- Throws:
IOException
- if an I/O error occurs.
-
close
Deprecated, for removal: This API element is subject to removal in a future version.- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
- Overrides:
close
in classOutputStream
- Throws:
IOException
-
write
Deprecated, for removal: This API element is subject to removal in a future version.- Specified by:
write
in interfaceDataOutput
- Specified by:
write
in classOutputStream
- Throws:
IOException
-
write
Deprecated, for removal: This API element is subject to removal in a future version.- Specified by:
write
in interfaceDataOutput
- Overrides:
write
in classOutputStream
- Throws:
IOException
-
write
Deprecated, for removal: This API element is subject to removal in a future version.- Specified by:
write
in interfaceDataOutput
- Overrides:
write
in classOutputStream
- Throws:
IOException
-
writeBoolean
Deprecated, for removal: This API element is subject to removal in a future version.- Specified by:
writeBoolean
in interfaceDataOutput
- Throws:
IOException
-
writeByte
Deprecated, for removal: This API element is subject to removal in a future version.- Specified by:
writeByte
in interfaceDataOutput
- Throws:
IOException
-
writeShort
Deprecated, for removal: This API element is subject to removal in a future version.- Specified by:
writeShort
in interfaceDataOutput
- Throws:
IOException
-
writeChar
Deprecated, for removal: This API element is subject to removal in a future version.- Specified by:
writeChar
in interfaceDataOutput
- Throws:
IOException
-
writeInt
Deprecated, for removal: This API element is subject to removal in a future version.- Specified by:
writeInt
in interfaceDataOutput
- Throws:
IOException
-
writeLong
Deprecated, for removal: This API element is subject to removal in a future version.- Specified by:
writeLong
in interfaceDataOutput
- Throws:
IOException
-
writeFloat
Deprecated, for removal: This API element is subject to removal in a future version.- Specified by:
writeFloat
in interfaceDataOutput
- Throws:
IOException
-
writeDouble
Deprecated, for removal: This API element is subject to removal in a future version.- Specified by:
writeDouble
in interfaceDataOutput
- Throws:
IOException
-
writeBytes
Deprecated, for removal: This API element is subject to removal in a future version.- Specified by:
writeBytes
in interfaceDataOutput
- Throws:
IOException
-
writeChars
Deprecated, for removal: This API element is subject to removal in a future version.- Specified by:
writeChars
in interfaceDataOutput
- Throws:
IOException
-
writeUTF
Deprecated, for removal: This API element is subject to removal in a future version.- Specified by:
writeUTF
in interfaceDataOutput
- Throws:
IOException
-
flush
Deprecated, for removal: This API element is subject to removal in a future version.Flush output.- Specified by:
flush
in interfaceFlushable
- Overrides:
flush
in classOutputStream
- Throws:
IOException
-
LinBinaryIO
instead