public static byte[] concatTags(byte[] tags, ExtendedCell cell) {
    int cellTagsLen = cell.getTagsLength();
    if (cellTagsLen == 0) {
      // If no Tags, return early.
      return tags;
    }
    byte[] b = new byte[tags.length + cellTagsLen];
    int pos = Bytes.putBytes(b, 0, tags, 0, tags.length);
    if (cell instanceof ByteBufferExtendedCell) {
      ByteBufferUtils.copyFromBufferToArray(b, ((ByteBufferExtendedCell) cell).getTagsByteBuffer(),
        ((ByteBufferExtendedCell) cell).getTagsPosition(), pos, cellTagsLen);
    } else {
      Bytes.putBytes(b, pos, cell.getTagsArray(), cell.getTagsOffset(), cellTagsLen);
    }
    return b;
  }
Add to <code>tagsOrNull</code> any Tags <code>cell</code> is carrying or null if none.
hbase-common/src/main/java/org/apache/hadoop/hbase/TagUtil.java