CUSTOM_TAG_TYPE_RANGE, INFRASTRUCTURE_SIZE, MAX_TAG_LENGTH, TAG_LENGTH_SIZE, TYPE_LENGTH_SIZE| Constructor and Description |
|---|
ArrayBackedTag(byte[] bytes,
int offset)
Creates a Tag from the specified byte array and offset.
|
ArrayBackedTag(byte[] bytes,
int offset,
int length)
Creates a Tag from the specified byte array, starting at offset, and for length
length. |
ArrayBackedTag(byte tagType,
byte[] tag)
Format for a tag :
<length of tag - 2 bytes><type code - 1 byte><tag> tag length is serialized
using 2 bytes only but as this will be unsigned, we can have max tag length of
(Short.MAX_SIZE * 2) +1. |
ArrayBackedTag(byte tagType,
String tag)
The special tag will write the length of each tag and that will be
followed by the type and then the actual tag.
|
| Modifier and Type | Method and Description |
|---|---|
byte |
getType() |
byte[] |
getValueArray() |
ByteBuffer |
getValueByteBuffer() |
int |
getValueLength() |
int |
getValueOffset() |
boolean |
hasArray()
Tells whether or not this Tag is backed by a byte array.
|
String |
toString() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitcloneValue, copyValueTo, getValueAsByte, getValueAsLong, getValueAsString, matchingValuepublic ArrayBackedTag(byte tagType,
String tag)
public ArrayBackedTag(byte tagType,
byte[] tag)
<length of tag - 2 bytes><type code - 1 byte><tag> tag length is serialized
using 2 bytes only but as this will be unsigned, we can have max tag length of
(Short.MAX_SIZE * 2) +1. It includes 1 byte type length and actual tag bytes length.public ArrayBackedTag(byte[] bytes,
int offset)
bytes content starting at offset is formatted as
a Tag blob.
The bytes to include the tag type, tag length and actual tag bytes.offset - offset to start of Tagpublic ArrayBackedTag(byte[] bytes,
int offset,
int length)
length. Presumes bytes content starting at offset is
formatted as a Tag blob.public byte[] getValueArray()
getValueArray in interface Tagpublic int getValueLength()
getValueLength in interface Tagpublic int getValueOffset()
getValueOffset in interface Tagpublic boolean hasArray()
Tagpublic ByteBuffer getValueByteBuffer()
getValueByteBuffer in interface TagByteBuffer containing the value bytes.Copyright © 2007–2020 The Apache Software Foundation. All rights reserved.