public void seekToBlock ( int blockNumber ) throws IOException { if ( in == null ) throw new XZIOException ( "Stream closed" ) ; if ( blockNumber < 0 || blockNumber >= blockCount ) throw new XZIOException ( "Invalid XZ Block number: " + blockNumber ) ; // This is a bit silly implementation. Here we locate the uncompressed // offset of the specified Block, then when doing the actual seek in // seek(), we need to find the Block number based on seekPos. seekPos = getBlockPos ( blockNumber ) ; seekNeeded = true ; }
Seeks to the beginning of the given XZ Block .