public static int copyQualifierTo(Cell cell, byte[] destination, int destinationOffset) {
    int qlen = cell.getQualifierLength();
    if (cell instanceof ByteBufferExtendedCell) {
      ByteBufferUtils.copyFromBufferToArray(destination,
        ((ByteBufferExtendedCell) cell).getQualifierByteBuffer(),
        ((ByteBufferExtendedCell) cell).getQualifierPosition(), destinationOffset, qlen);
    } else {
      System.arraycopy(cell.getQualifierArray(), cell.getQualifierOffset(), destination,
        destinationOffset, qlen);
    }
    return destinationOffset + qlen;
  }
Copies the qualifier to the given byte[]
@param cell              the cell whose qualifier has to be copied
@param destination       the destination byte[] to which the qualifier has to be copied
@param destinationOffset the offset in the destination byte[]
@return the offset of the byte[] after the copy has happened
hbase-common/src/main/java/org/apache/hadoop/hbase/CellUtil.java