private void copyCallbacks(Callback[] cb1,Callback[] cb2){
  int len1=cb1.length;
  int len2=cb2.length;
  if (len1 == len2) {
    for (int m=0; m < len1; m++) {
      if (cb1[m] != cb2[m]) {
        cb1[m]=cb2[m];
      }
    }
  }
 else {
    int indx1=0;
    int indx2=0;
    while (indx1 < len1 && cb1[indx1] instanceof PagePropertiesCallback) {
      indx1++;
    }
    while (indx2 < len2 && cb2[indx2] instanceof PagePropertiesCallback) {
      indx2++;
    }
    int n=len1 - indx1;
    if (n > len2 - indx2) {
      n=len2 - indx2;
    }
    for (int m=0; m < n; m++) {
      if (cb1[indx1] != cb2[indx2]) {
        cb1[indx1]=cb2[indx2];
      }
      indx1++;
      indx2++;
    }
  }
}

private void copyCallbacks ( Callback [ ] cb1 , Callback [ ] cb2 ) { int len1 = cb1 . length ; int len2 = cb2 . length ; if ( len1 == len2 ) { for ( int m = 0 ; m < len1 ; m ++ ) { if ( cb1 [ m ] != cb2 [ m ] ) { cb1 [ m ] = cb2 [ m ] ; } } } else { int indx1 = 0 ; int indx2 = 0 ; while ( indx1 < len1 && cb1 [ indx1 ] instanceof PagePropertiesCallback ) { indx1 ++ ; } while ( indx2 < len2 && cb2 [ indx2 ] instanceof PagePropertiesCallback ) { indx2 ++ ; } int n = len1 - indx1 ; if ( n > len2 - indx2 ) { n = len2 - indx2 ; } for ( int m = 0 ; m < n ; m ++ ) { if ( cb1 [ indx1 ] != cb2 [ indx2 ] ) { cb1 [ indx1 ] = cb2 [ indx2 ] ; } indx1 ++ ; indx2 ++ ; } } }
clones callbacks from cb2 to cb1 .
