code: public static String scalarValueToString(TableDefinition tableDef, String fieldName, byte[] colValue) {
          // Only binary fields are treated specially.
          FieldDefinition fieldDef = tableDef.getFieldDef(fieldName);
          if (fieldDef != null && fieldDef.isBinaryField()) {
              return fieldDef.getEncoding().encode(colValue);
          } else {
              return Utils.toString(colValue);
          }
      }
docs: Convert the given binary scalar field value to string form based on its definition.
  This method is the twin of
  {@link #scalarValueToBinary(TableDefinition, String, String)}.
  
  @param tableDef      TableDefinition that defines field.
  @param fieldName     Name of a scalar field.
  @param colValue      Binary column value.
  @return              Scalar value as a string.