Class NbtBinarySerializer
java.lang.Object
com.comphenix.protocol.wrappers.nbt.io.NbtBinarySerializer
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final NbtBinarySerializerRetrieve a default instance of the NBT binary serializer. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription<TType> NbtWrapper<TType> deserialize(DataInput source) Load an NBT tag from a stream.deserializeCompound(DataInput source) Load an NBT compound from a stream.<T> NbtList<T> deserializeList(DataInput source) Load an NBT list from a stream.<T> voidserialize(NbtBase<T> value, DataOutput destination) Write the content of a wrapped NBT tag to a stream.
-
Field Details
-
DEFAULT
Retrieve a default instance of the NBT binary serializer.
-
-
Constructor Details
-
NbtBinarySerializer
public NbtBinarySerializer()
-
-
Method Details
-
serialize
Write the content of a wrapped NBT tag to a stream.- Type Parameters:
T- Type- Parameters:
value- - the NBT tag to write.destination- - the destination stream.
-
deserialize
Load an NBT tag from a stream.- Type Parameters:
TType- Type- Parameters:
source- - the input stream.- Returns:
- An NBT tag.
-
deserializeCompound
Load an NBT compound from a stream.- Parameters:
source- - the input stream.- Returns:
- An NBT compound.
-
deserializeList
Load an NBT list from a stream.- Type Parameters:
T- Type- Parameters:
source- - the input stream.- Returns:
- An NBT list.
-