code: private int parseChar()
          throws IOException
      {
          while (_chunkLength <= 0) {
              if (_isLastChunk)
                  return -1;
  
              int code = read();
  
              switch (code) {
                  case 's':
                  case 'x':
                      _isLastChunk = false;
  
                      _chunkLength = (read() << 8) + read();
                      break;
  
                  case 'S':
                  case 'X':
                      _isLastChunk = true;
  
                      _chunkLength = (read() << 8) + read();
                      break;
  
                  default:
                      throw expect("string", code);
              }
  
          }
  
          _chunkLength--;
  
          return parseUTF8Char();
      }
docs: Reads a character from the underlying stream.