@InterfaceAudience.Private @InterfaceStability.Evolving public class ByteBufferTag extends Object implements Tag
Tag implementation in which value is backed by ByteBufferCUSTOM_TAG_TYPE_RANGE, INFRASTRUCTURE_SIZE, MAX_TAG_LENGTH, TAG_LENGTH_SIZE, TYPE_LENGTH_SIZE| Constructor and Description |
|---|
ByteBufferTag(ByteBuffer buffer,
int offset,
int length) |
| Modifier and Type | Method and Description |
|---|---|
byte |
getType()
Returns the tag type
|
byte[] |
getValueArray()
Return an array containing the value bytes if
Tag.hasArray() returns true. |
ByteBuffer |
getValueByteBuffer()
Returns The
ByteBuffer containing the value bytes. |
int |
getValueLength()
Returns Length of tag value within the backed buffer
|
int |
getValueOffset()
Returns Offset of tag value within the backed buffer
|
boolean |
hasArray()
Return true if the tag is backed by a byte array
|
String |
toString() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitcloneValue, copyValueTo, getValueAsByte, getValueAsLong, getValueAsString, matchingValuepublic ByteBufferTag(ByteBuffer buffer, int offset, int length)
public byte getType()
Tagpublic int getValueOffset()
TaggetValueOffset in interface Tagpublic int getValueLength()
TaggetValueLength in interface Tagpublic boolean hasArray()
Tagpublic byte[] getValueArray()
TagTag.hasArray() returns true.
Use Tag.getValueByteBuffer() otherwise.
getValueArray in interface Tagpublic ByteBuffer getValueByteBuffer()
TagByteBuffer containing the value bytes.getValueByteBuffer in interface TagCopyright © 2007–2020 The Apache Software Foundation. All rights reserved.