public long skip(long n) throws IOException {
  if (n < 0L)   throw new IllegalArgumentException("skip value is negative");
  int nn=(int)Math.min(n,maxSkipBufferSize);
synchronized (lock) {
    if ((skipBuffer == null) || (skipBuffer.length < nn))     skipBuffer=new char[nn];
    long r=n;
    while (r > 0) {
      int nc=read(skipBuffer,0,(int)Math.min(r,nn));
      if (nc == -1)       break;
      r-=nc;
    }
    return n - r;
  }
}

public long skip ( long n ) throws IOException { if ( n < 0L ) throw new IllegalArgumentException ( "skip value is negative" ) ; int nn = ( int ) Math . min ( n , maxSkipBufferSize ) ; synchronized ( lock ) { if ( ( skipBuffer == null ) || ( skipBuffer . length < nn ) ) skipBuffer = new char [ nn ] ; long r = n ; while ( r > 0 ) { int nc = read ( skipBuffer , 0 , ( int ) Math . min ( r , nn ) ) ; if ( nc == - 1 ) break ; r -= nc ; } return n - r ; } }
skips characters . this method will block until some characters are available , an i / o error occurs , or the end of the stream is reached .
