format/src/main/java/com/github/sadikovi/riff/FileFooter.java
/** Prepare stripes from byte buffer, if applicable */
Prepare stripes from byte buffer, if applicable
Prepare stripes from byte buffer if applicable
private void prepareStripeInformation() {
    if (stripes != null) return;
    if (buffer == null) {
      throw new IllegalArgumentException(
        "Byte buffer is null, cannot reconstruct stripe information");
    }
    int stripeLen = buffer.getInt(), i = 0;
    stripes = new StripeInformation[stripeLen];
    while (i < stripeLen) {
      try {
        stripes[i++] = StripeInformation.readExternal(buffer);
      } catch (IOException ioe) {
        throw new RuntimeException("Failed to read stripe " + i, ioe);
      }
    }
    buffer = null;
  }
private void prepareStripeInformation ( ) { if ( stripes != null ) return ; if ( buffer == null ) { throw new IllegalArgumentException ( "Byte buffer is null, cannot reconstruct stripe information" ) ; } int stripeLen = buffer . getInt ( ) , i = 0 ; stripes = new StripeInformation [ stripeLen ] ; while ( i < stripeLen ) { try { stripes [ i ++ ] = StripeInformation . readExternal ( buffer ) ; } catch ( IOException ioe ) { throw new RuntimeException ( "Failed to read stripe " + i , ioe ) ; } } buffer = null ; }
Prepare stripes from byte buffer, if applicable
Prepare stripes from byte buffer if applicable