public void prepare() throws IOException {
  int buffers=numberOfBuffers;
  if (buffers < MIN_BUFFERS) {
    buffers=MIN_BUFFERS;
  }
 else   if (buffers > MAX_BUFFERS) {
    buffers=MAX_BUFFERS;
  }
  for (int i=0; i < buffers; i++) {
    ByteBuffer byteBuffer=byteBufferProvider.acquireByteBuffer();
    emptyBuffers.add(byteBuffer);
  }
}

public void prepare ( ) throws IOException { int buffers = numberOfBuffers ; if ( buffers < MIN_BUFFERS ) { buffers = MIN_BUFFERS ; } else if ( buffers > MAX_BUFFERS ) { buffers = MAX_BUFFERS ; } for ( int i = 0 ; i < buffers ; i ++ ) { ByteBuffer byteBuffer = byteBufferProvider . acquireByteBuffer ( ) ; emptyBuffers . add ( byteBuffer ) ; } }
prepares the stream for read . must be called before any read operation is executed . < p > implementing classes must extend this method in way that full buffers queue is filled with data that will be available for the reader of input stream .
