class ColumnUtil {

  public static Column getDataColumnFromConstructedQualifier(Column lockColumn) {
    byte[] constructedQualifier = lockColumn.getQualifier();
    if (constructedQualifier == null) {
      // TODO : throw exception or log an error
      return lockColumn;
    }
    int index = -1;
    for (int i = 0; i < constructedQualifier.length; ++i) {
      // the first PRESERVED_COLUMN_CHARACTER_BYTES exist in lockQualifier is the delimiter
      if (PRESERVED_COLUMN_CHARACTER_BYTES[0] == constructedQualifier[i]) {
        index = i;
        break;
      }
    }
    if (index <= 0) {
      return lockColumn;
    } else {
      byte[] family = new byte[index];
      byte[] qualifier = new byte[constructedQualifier.length - index - 1];
      System.arraycopy(constructedQualifier, 0, family, 0, index);
      System.arraycopy(constructedQualifier, index + 1, qualifier, 0, constructedQualifier.length
          - index - 1);
      return new Column(family, qualifier);
    }
  }

}