public static byte[] removeQuotesFromByteArray(byte[] quotedByteArray) {
    if (
      quotedByteArray == null || quotedByteArray.length < 2
        || quotedByteArray[0] != ParseConstants.SINGLE_QUOTE
        || quotedByteArray[quotedByteArray.length - 1] != ParseConstants.SINGLE_QUOTE
    ) {
      throw new IllegalArgumentException("removeQuotesFromByteArray needs a quoted byte array");
    } else {
      byte[] targetString = new byte[quotedByteArray.length - 2];
      Bytes.putBytes(targetString, 0, quotedByteArray, 1, quotedByteArray.length - 2);
      return targetString;
    }
  }
Takes a quoted byte array and converts it into an unquoted byte array For example: given a byte
array representing 'abc', it returns a byte array representing abc
<p>
@param quotedByteArray the quoted byte array
@return Unquoted byte array
hbase-client/src/main/java/org/apache/hadoop/hbase/filter/ParseFilter.java