-
- All Implemented Interfaces:
public final class NbtByteArray extends NbtTag
A tag which wraps a mutable byte array.
-
-
Field Summary
Fields Modifier and Type Field Description private final String
stringValue
private ByteArray
value
-
Constructor Summary
Constructors Constructor Description NbtByteArray()
Creates a new tag with an empty array. NbtByteArray(String value)
Parses the string using the same structure which is returned by stringValue. NbtByteArray(ByteArray value)
-
Method Summary
Modifier and Type Method Description String
getStringValue()
Returns a string representation of the tag's value. final ByteArray
getValue()
final Unit
setValue(ByteArray value)
Boolean
equals(Object other)
Properly checks the equality of the array. Integer
hashCode()
Properly calculates the hashcode of the array. NbtByteArray
deepCopy()
Returns a new wrapper with a copy of the current value. -
-
Constructor Detail
-
NbtByteArray
NbtByteArray()
Creates a new tag with an empty array.
-
NbtByteArray
NbtByteArray(String value)
Parses the string using the same structure which is returned by stringValue.- Parameters:
value
- A string with a structure like[0, -32, 48, 127]
-
NbtByteArray
NbtByteArray(ByteArray value)
-
-
Method Detail
-
getStringValue
String getStringValue()
Returns a string representation of the tag's value.
The NbtList and the array types will have an output similar to a normal List and NbtCompound to a normal Map.
The class names of the NbtList's and NbtCompound's children will expose.
The returned string is compatible with string constructors of the same type.
Be aware that this may be a slow operation on big lists, arrays or compounds.
-
deepCopy
NbtByteArray deepCopy()
Returns a new wrapper with a copy of the current value.
-
-
-
-