| Modifier and Type | Field and Description |
|---|---|
static int |
ID |
| Constructor and Description |
|---|
ByteArrayTag()
Creates a tag.
|
ByteArrayTag(byte[] value)
Creates a tag.
|
| Modifier and Type | Method and Description |
|---|---|
ByteArrayTag |
clone() |
boolean |
equals(Object o) |
int |
getTagId()
Returns the NBT tag id of this tag type, used in I/O.
|
byte[] |
getValue()
Gets the value of this tag.
|
byte |
getValue(int index)
Gets a value in this tag's array.
|
int |
hashCode() |
int |
length()
Gets the length of this tag's array.
|
void |
read(DataInput in)
Reads this tag from an input stream.
|
void |
setValue(byte[] value)
Sets the value of this tag.
|
void |
setValue(int index,
byte value)
Sets a value in this tag's array.
|
void |
write(DataOutput out)
Writes this tag to an output stream.
|
public static final int ID
public ByteArrayTag()
public ByteArrayTag(byte[] value)
value - The value of the tag.public byte[] getValue()
Tagpublic void setValue(byte[] value)
value - New value of this tag.public byte getValue(int index)
index - Index of the value.public void setValue(int index,
byte value)
index - Index of the value.value - Value to set.public int length()
public void read(DataInput in) throws IOException
Tagread in class Tagin - Stream to write to.IOException - If an I/O error occurs.public void write(DataOutput out) throws IOException
Tagwrite in class Tagout - Stream to write to.IOException - If an I/O error occurs.public final ByteArrayTag clone()
Copyright © 2021. All rights reserved.