public static byte[] encodeValue(byte[] value, String hiveType, boolean stringEncoded) {
    if (stringEncoded) {
      return encodeStringValue(value, hiveType);
    } else {
      return encodeBinaryValue(value, hiveType);
    }
  }
Utility class to encode index values for accumulo.
accumulo-handler/src/java/org/apache/hadoop/hive/accumulo/AccumuloIndexLexicoder.java