private static void readChar(ByteToChar converter,CharReader is,int ch,boolean isTop) throws IOException {
  if (ch == '+') {
    if (isTop)     converter.addByte(' ');
 else     converter.addChar(' ');
  }
 else   if (ch == '%') {
    int ch1=is.next();
    if (ch1 == 'u') {
      ch1=is.next();
      int ch2=is.next();
      int ch3=is.next();
      int ch4=is.next();
      converter.addChar((char)((toHex(ch1) << 12) + (toHex(ch2) << 8) + (toHex(ch3) << 4)+ (toHex(ch4))));
    }
 else {
      int ch2=is.next();
      converter.addByte(((toHex(ch1) << 4) + toHex(ch2)));
    }
  }
 else   if (isTop) {
    converter.addByte((byte)ch);
  }
 else {
    converter.addChar((char)ch);
  }
}

private static void readChar ( ByteToChar converter , CharReader is , int ch , boolean isTop ) throws IOException { if ( ch == '+' ) { if ( isTop ) converter . addByte ( ' ' ) ; else converter . addChar ( ' ' ) ; } else if ( ch == '%' ) { int ch1 = is . next ( ) ; if ( ch1 == 'u' ) { ch1 = is . next ( ) ; int ch2 = is . next ( ) ; int ch3 = is . next ( ) ; int ch4 = is . next ( ) ; converter . addChar ( ( char ) ( ( toHex ( ch1 ) << 12 ) + ( toHex ( ch2 ) << 8 ) + ( toHex ( ch3 ) << 4 ) + ( toHex ( ch4 ) ) ) ) ; } else { int ch2 = is . next ( ) ; converter . addByte ( ( ( toHex ( ch1 ) << 4 ) + toHex ( ch2 ) ) ) ; } } else if ( isTop ) { converter . addByte ( ( byte ) ch ) ; } else { converter . addChar ( ( char ) ch ) ; } }
scans the next character from the input stream , adding it to the converter .
