opendap/src/main/java/opendap/servlet/ReqState.java
private String prepCE(String ce) {

    int index;

    //System.out.println("- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ");
    //System.out.println("Prepping: \""+ce+"\"");

    if (ce == null) {
      ce = "";
      //System.out.println("null Constraint expression.");
    } else if (!ce.equals("")) {

      //System.out.println("Searching for:  %");
      index = ce.indexOf("%");
      //System.out.println("index of %: "+index);

      if (index == -1)
        return (ce);

      if (index > (ce.length() - 3))
        return (null);

      while (index >= 0) {
        //System.out.println("Found % at character " + index);

        String specChar = ce.substring(index + 1, index + 3);
        //System.out.println("specChar: \"" + specChar + "\"");

        // Convert that bad boy!
        char val = (char) Byte.parseByte(specChar, 16);
        //System.out.println("                val: '" + val + "'");
        //System.out.println("String.valueOf(val): \"" + String.valueOf(val) + "\"");


        ce = ce.substring(0, index) + String.valueOf(val) + ce.substring(index + 3, ce.length());
        //System.out.println("ce: \"" + ce + "\"");

        index = ce.indexOf("%");
        if (index > (ce.length() - 3))
          return (null);
      }
    }

//      char ca[] = ce.toCharArray();
//	for(int i=0; i<ca.length ;i++)
//	    System.out.print("'"+(byte)ca[i]+"' ");
//	System.out.println("");
//	System.out.println(ce);
//	System.out.println("- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ");

//        System.out.println("Returning CE: \""+ce+"\"");
    return (ce);
  }
private String prepCE(String ce) {

    int index;

    //System.out.println("- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ");
    //System.out.println("Prepping: \""+ce+"\"");

    if (ce == null) {
      ce = "";
      //System.out.println("null Constraint expression.");
    } else if (!ce.equals("")) {

      //System.out.println("Searching for:  %");
      index = ce.indexOf("%");
      //System.out.println("index of %: "+index);

      if (index == -1)
        return (ce);

      if (index > (ce.length() - 3))
        return (null);

      while (index >= 0) {
        //System.out.println("Found % at character " + index);

        String specChar = ce.substring(index + 1, index + 3);
        //System.out.println("specChar: \"" + specChar + "\"");

        // Convert that bad boy!
        char val = (char) Byte.parseByte(specChar, 16);
        //System.out.println("                val: '" + val + "'");
        //System.out.println("String.valueOf(val): \"" + String.valueOf(val) + "\"");


        ce = ce.substring(0, index) + String.valueOf(val) + ce.substring(index + 3, ce.length());
        //System.out.println("ce: \"" + ce + "\"");

        index = ce.indexOf("%");
        if (index > (ce.length() - 3))
          return (null);
      }
    }

//      char ca[] = ce.toCharArray();
//	for(int i=0; i<ca.length ;i++)
//	    System.out.print("'"+(byte)ca[i]+"' ");
//	System.out.println("");
//	System.out.println(ce);
//	System.out.println("- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ");

//        System.out.println("Returning CE: \""+ce+"\"");
    return (ce);
  }
*************************************************************************
This method is used to convert special characters into their
actual byte values.
<p/>
For example, in a URL the space character
is represented as "%20" this method will replace that with a
space charater. (a single value of 0x20)

@param ce The constraint expresion string as collected from the request
object with <code>getQueryString()</code>
@return A string containing the prepared constraint expression. If there
is a problem with the constraint expression a <code>null</code> is returned.