@Override public synchronized long skip(long n) throws IOException {
  long skipped=0;
  while (n > 0) {
    int len=(int)Math.min(n,SKIP_ARRAY.length);
    int r=read(SKIP_ARRAY,0,len);
    if (r <= 0) {
      break;
    }
    n-=r;
    skipped+=r;
  }
  return skipped;
}

@ Override public synchronized long skip ( long n ) throws IOException { long skipped = 0 ; while ( n > 0 ) { int len = ( int ) Math . min ( n , SKIP_ARRAY . length ) ; int r = read ( SKIP_ARRAY , 0 , len ) ; if ( r <= 0 ) { break ; } n -= r ; skipped += r ; } return skipped ; }
skip n bytes . this implementation is somewhat less efficient than possible , but not badly so ( redundant copy ) . we reuse the read ( ) code to keep things simpler . note that skip_array is static and may garbled by concurrent use , but we are not interested in the data anyway .
