@ Override public GZIPChannel position ( long newPosition ) throws IOException { int skip = ( int ) ( newPosition - position ( ) ) ; if ( skip < 0 ) { throw new UnsupportedOperationException ( "backwards position not supported" ) ; } if ( skip > skipBuffer . capacity ( ) ) { throw new UnsupportedOperationException ( skip + " skip not supported maxSkipSize=" + maxSkipSize ) ; } if ( skip > 0 ) { if ( skipBuffer == null ) { throw new UnsupportedOperationException ( "skip not supported maxSkipSize=" + maxSkipSize ) ; } skipBuffer . clear ( ) ; skipBuffer . limit ( skip ) ; if ( options . contains ( READ ) ) { read ( skipBuffer ) ; } else { write ( skipBuffer ) ; } } return this ; }
Changes uncompressed position . Only forward direction is allowed with small skips . This method is for alignment purposes mostly .