code: public int scanChar() throws IOException {
  
  	// load more characters, if needed
  	if (fCurrentEntity.position == fCurrentEntity.count) {
  	    load(0, true);
  	}
  
  	// scan character
  	int c = fCurrentEntity.ch[fCurrentEntity.position++];
  	boolean external = false;
  	if (c == '\n' ||
  	    (c == '\r' && (external = fCurrentEntity.isExternal()))) {
  	    fCurrentEntity.lineNumber++;
  	    fCurrentEntity.columnNumber = 1;
  	    if (fCurrentEntity.position == fCurrentEntity.count) {
  		fCurrentEntity.ch[0] = (char)c;
  		load(1, false);
  	    }
  	    if (c == '\r' && external) {
  		if (fCurrentEntity.ch[fCurrentEntity.position++] != '\n') {
  		    fCurrentEntity.position--;
  		}
  		c = '\n';
  	    }
  	}
  
  	// return character that was scanned
  	fCurrentEntity.columnNumber++;
  	return c;
  	
      }
docs: Returns the next character on the input.
  <p>
  <strong>Note:</strong> The character is consumed.
  
  @throws IOException  Thrown if i/o error occurs.
  @throws EOFException Thrown on end of file.