private void lazySeek ( long targetPos , long len ) throws IOException { //For lazy seek seekInStream ( targetPos , len ) ; //re-open at specific location if needed if ( wrappedStream == null ) { reopen ( "read from new offset" , targetPos , len ) ; } }
Perform lazy seek and adjust stream to correct position for reading .