code: private static int scanUriEscape(ByteToChar converter,
                                     byte []rawUri, int i, int len)
      throws IOException
    {
      int ch1 = i < len ? (rawUri[i++] & 0xff) : -1;
  
      if (ch1 == 'u') {
        ch1 = i < len ? (rawUri[i++] & 0xff) : -1;
        int ch2 = i < len ? (rawUri[i++] & 0xff) : -1;
        int ch3 = i < len ? (rawUri[i++] & 0xff) : -1;
        int ch4 = i < len ? (rawUri[i++] & 0xff) : -1;
  
        converter.addChar((char) ((toHex(ch1) << 12) +
                                  (toHex(ch2) << 8) + 
                                  (toHex(ch3) << 4) + 
                                  (toHex(ch4))));
      }
      else {
        int ch2 = i < len ? (rawUri[i++] & 0xff) : -1;
  
        int b = (toHex(ch1) << 4) + toHex(ch2);;
  
        converter.addByte(b);
      }
  
      return i;
    }
docs: Scans the next character from URI, adding it to the converter.
  
  @param converter the byte-to-character converter
  @param rawUri the raw URI
  @param i index into the URI
  @param len the raw URI length
  
  @return next index into the URI