protected void ensureCapacity(int chunk){
  if (fNodeType == null) {
    fNodeType=new int[INITIAL_CHUNK_COUNT][];
    fNodeName=new Object[INITIAL_CHUNK_COUNT][];
    fNodeValue=new Object[INITIAL_CHUNK_COUNT][];
    fNodeParent=new int[INITIAL_CHUNK_COUNT][];
    fNodeLastChild=new int[INITIAL_CHUNK_COUNT][];
    fNodePrevSib=new int[INITIAL_CHUNK_COUNT][];
    fNodeURI=new Object[INITIAL_CHUNK_COUNT][];
    fNodeExtra=new int[INITIAL_CHUNK_COUNT][];
  }
 else   if (fNodeType.length <= chunk) {
    int newsize=chunk * 2;
    int[][] newArray=new int[newsize][];
    System.arraycopy(fNodeType,0,newArray,0,chunk);
    fNodeType=newArray;
    Object[][] newStrArray=new Object[newsize][];
    System.arraycopy(fNodeName,0,newStrArray,0,chunk);
    fNodeName=newStrArray;
    newStrArray=new Object[newsize][];
    System.arraycopy(fNodeValue,0,newStrArray,0,chunk);
    fNodeValue=newStrArray;
    newArray=new int[newsize][];
    System.arraycopy(fNodeParent,0,newArray,0,chunk);
    fNodeParent=newArray;
    newArray=new int[newsize][];
    System.arraycopy(fNodeLastChild,0,newArray,0,chunk);
    fNodeLastChild=newArray;
    newArray=new int[newsize][];
    System.arraycopy(fNodePrevSib,0,newArray,0,chunk);
    fNodePrevSib=newArray;
    newStrArray=new Object[newsize][];
    System.arraycopy(fNodeURI,0,newStrArray,0,chunk);
    fNodeURI=newStrArray;
    newArray=new int[newsize][];
    System.arraycopy(fNodeExtra,0,newArray,0,chunk);
    fNodeExtra=newArray;
  }
 else   if (fNodeType[chunk] != null) {
    return;
  }
  createChunk(fNodeType,chunk);
  createChunk(fNodeName,chunk);
  createChunk(fNodeValue,chunk);
  createChunk(fNodeParent,chunk);
  createChunk(fNodeLastChild,chunk);
  createChunk(fNodePrevSib,chunk);
  createChunk(fNodeURI,chunk);
  createChunk(fNodeExtra,chunk);
  return;
}

protected void ensureCapacity ( int chunk ) { if ( fNodeType == null ) { fNodeType = new int [ INITIAL_CHUNK_COUNT ] [ ] ; fNodeName = new Object [ INITIAL_CHUNK_COUNT ] [ ] ; fNodeValue = new Object [ INITIAL_CHUNK_COUNT ] [ ] ; fNodeParent = new int [ INITIAL_CHUNK_COUNT ] [ ] ; fNodeLastChild = new int [ INITIAL_CHUNK_COUNT ] [ ] ; fNodePrevSib = new int [ INITIAL_CHUNK_COUNT ] [ ] ; fNodeURI = new Object [ INITIAL_CHUNK_COUNT ] [ ] ; fNodeExtra = new int [ INITIAL_CHUNK_COUNT ] [ ] ; } else if ( fNodeType . length <= chunk ) { int newsize = chunk * 2 ; int [ ] [ ] newArray = new int [ newsize ] [ ] ; System . arraycopy ( fNodeType , 0 , newArray , 0 , chunk ) ; fNodeType = newArray ; Object [ ] [ ] newStrArray = new Object [ newsize ] [ ] ; System . arraycopy ( fNodeName , 0 , newStrArray , 0 , chunk ) ; fNodeName = newStrArray ; newStrArray = new Object [ newsize ] [ ] ; System . arraycopy ( fNodeValue , 0 , newStrArray , 0 , chunk ) ; fNodeValue = newStrArray ; newArray = new int [ newsize ] [ ] ; System . arraycopy ( fNodeParent , 0 , newArray , 0 , chunk ) ; fNodeParent = newArray ; newArray = new int [ newsize ] [ ] ; System . arraycopy ( fNodeLastChild , 0 , newArray , 0 , chunk ) ; fNodeLastChild = newArray ; newArray = new int [ newsize ] [ ] ; System . arraycopy ( fNodePrevSib , 0 , newArray , 0 , chunk ) ; fNodePrevSib = newArray ; newStrArray = new Object [ newsize ] [ ] ; System . arraycopy ( fNodeURI , 0 , newStrArray , 0 , chunk ) ; fNodeURI = newStrArray ; newArray = new int [ newsize ] [ ] ; System . arraycopy ( fNodeExtra , 0 , newArray , 0 , chunk ) ; fNodeExtra = newArray ; } else if ( fNodeType [ chunk ] != null ) { return ; } createChunk ( fNodeType , chunk ) ; createChunk ( fNodeName , chunk ) ; createChunk ( fNodeValue , chunk ) ; createChunk ( fNodeParent , chunk ) ; createChunk ( fNodeLastChild , chunk ) ; createChunk ( fNodePrevSib , chunk ) ; createChunk ( fNodeURI , chunk ) ; createChunk ( fNodeExtra , chunk ) ; return ; }
ensures that the internal tables are large enough .
