// This method prepends "length" chars from the char array,
// from offset 0, to the manager's fCurrentEntity.ch.
private void fixupCurrentEntity(XMLEntityManager manager,
char [] scannedChars, int length) {
ScannedEntity currentEntity = manager.getCurrentEntity();
if(currentEntity.count-currentEntity.position+length > currentEntity.ch.length) {
//resize array; this case is hard to imagine...
char[] tempCh = currentEntity.ch;
currentEntity.ch = new char[length+currentEntity.count-currentEntity.position+1];
System.arraycopy(tempCh, 0, currentEntity.ch, 0, tempCh.length);