private static int scanUriEscape ( ByteToChar converter , byte [ ] rawUri , int i , int len ) throws IOException { int ch1 = i < len ? ( rawUri [ i ++ ] & 0xff ) : - 1 ; if ( ch1 == ' ' ) { 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 ; }
Scans the next character from URI adding it to the converter .