Modifier and Type | Field and Description |
---|---|
(package private) static Iterator<Tag> |
EMPTY_TAGS_ITR
Iterator returned when no Tags.
|
Modifier | Constructor and Description |
---|---|
private |
TagUtil() |
Modifier and Type | Method and Description |
---|---|
static List<Tag> |
asList(byte[] b,
int offset,
int length)
Creates list of tags from given byte array, expected that it is in the expected tag format.
|
static List<Tag> |
carryForwardTags(Cell cell) |
static List<Tag> |
carryForwardTags(List<Tag> tagsOrNull,
Cell cell)
Add to
tagsOrNull any Tags cell is carrying or null if none. |
static List<Tag> |
carryForwardTTLTag(List<Tag> tagsOrNull,
long ttl) |
static byte[] |
concatTags(byte[] tags,
Cell cell) |
static byte[] |
fromList(List<Tag> tags)
Write a list of tags into a byte array
Note : these are all purely internal APIs.
|
static Pair<Integer,Integer> |
readVIntValuePart(Tag tag,
int offset)
Reads an int value stored as a VInt at tag's given offset.
|
static final Iterator<Tag> EMPTY_TAGS_ITR
private TagUtil()
public static List<Tag> asList(byte[] b, int offset, int length)
b
- The byte arrayoffset
- The offset in array where tag bytes beginlength
- Total length of all tags bytespublic static Pair<Integer,Integer> readVIntValuePart(Tag tag, int offset) throws IOException
tag
- The Tagoffset
- The offset where VInt bytes beginIOException
- When varint is malformed and not able to be read correctlypublic static List<Tag> carryForwardTags(Cell cell)
cell
else null.public static List<Tag> carryForwardTags(List<Tag> tagsOrNull, Cell cell)
tagsOrNull
any Tags cell
is carrying or null if none.public static byte[] concatTags(byte[] tags, Cell cell)
public static List<Tag> carryForwardTTLTag(List<Tag> tagsOrNull, long ttl)
public static byte[] fromList(List<Tag> tags)
tags
- The list of tagsCopyright © 2007–2019 The Apache Software Foundation. All rights reserved.