format/src/main/java/com/github/sadikovi/riff/Buffers.java
/**
     * Method resets current stripe and instream to read the next batch of data.
     * If there are no stripes left, this method is no-op.
     * @throws IOException
     */
Method resets current stripe and instream to read the next batch of data.
If there are no stripes left, this method is no-op.
Method resets current stripe and instream to read the next batch of data . If there are no stripes left this method is no - op .
protected void bufferStripe() throws IOException {
      if (currentStripeIndex >= stripes.length) return;
      info = stripes[currentStripeIndex++];
      if (currentStream != null) {
        currentStream.close();
        currentStripe.close();
        currentStream = null;
        currentStripe = null;
      }
      LOG.debug("Read stripe {}", info);
      in.seek(info.offset() + offset);
      byte[] bytes = new byte[info.length()];
      in.readFully(bytes);
      currentStripe = new StripeInputBuffer(info.id(), bytes);
      currentStream = new InStream(bufferSize, codec, currentStripe);
      LOG.debug("Buffer new stream {}", currentStream);
    }
protected void bufferStripe ( ) throws IOException { if ( currentStripeIndex >= stripes . length ) return ; info = stripes [ currentStripeIndex ++ ] ; if ( currentStream != null ) { currentStream . close ( ) ; currentStripe . close ( ) ; currentStream = null ; currentStripe = null ; } LOG . debug ( "Read stripe {}" , info ) ; in . seek ( info . offset ( ) + offset ) ; byte [ ] bytes = new byte [ info . length ( ) ] ; in . readFully ( bytes ) ; currentStripe = new StripeInputBuffer ( info . id ( ) , bytes ) ; currentStream = new InStream ( bufferSize , codec , currentStripe ) ; LOG . debug ( "Buffer new stream {}" , currentStream ) ; }
Method resets current stripe and instream to read the next batch of data.
Method resets current stripe and instream to read the next batch of data .
// reset state // seek to a position in raw stream