public class NbtTextSerializer extends Object
| Modifier and Type | Field and Description |
|---|---|
static NbtTextSerializer |
DEFAULT
A default instance of this serializer.
|
| Constructor and Description |
|---|
NbtTextSerializer() |
NbtTextSerializer(NbtBinarySerializer binary)
Construct a serializer with a custom binary serializer.
|
| Modifier and Type | Method and Description |
|---|---|
<TType> NbtWrapper<TType> |
deserialize(String input)
Deserialize a NBT tag from a base-64 encoded string.
|
NbtCompound |
deserializeCompound(String input)
Deserialize a NBT compound from a base-64 encoded string.
|
<T> NbtList<T> |
deserializeList(String input)
Deserialize a NBT list from a base-64 encoded string.
|
NbtBinarySerializer |
getBinarySerializer()
Retrieve the binary serializer that is used.
|
<TType> String |
serialize(NbtBase<TType> value)
Serialize a NBT tag to a base-64 encoded string.
|
public static final NbtTextSerializer DEFAULT
public NbtTextSerializer()
public NbtTextSerializer(NbtBinarySerializer binary)
binary - - binary serializer.public NbtBinarySerializer getBinarySerializer()
public <TType> String serialize(NbtBase<TType> value)
TType - Typevalue - - the NBT tag to serialize.public <TType> NbtWrapper<TType> deserialize(String input) throws IOException
TType - Typeinput - - the base-64 string.IOException - If we are unable to parse the input.public NbtCompound deserializeCompound(String input) throws IOException
input - - the base-64 string.IOException - If we are unable to parse the input.public <T> NbtList<T> deserializeList(String input) throws IOException
T - Typeinput - - the base-64 string.IOException - If we are unable to parse the input.Copyright © 2012–2017 Comphenix and dmulloy2. Licensed under the GNU GPL v2.