private boolean ensureDataInBuffer() throws IOException {
  if (mBufferOffset < mBufferedSize) {
    return true;
  }
  final int readData=mInputStream.read(mByteArray);
  if (readData <= 0) {
    return false;
  }
  mBufferedSize=readData;
  mBufferOffset=0;
  return true;
}

private boolean ensureDataInBuffer ( ) throws IOException { if ( mBufferOffset < mBufferedSize ) { return true ; } final int readData = mInputStream . read ( mByteArray ) ; if ( readData <= 0 ) { return false ; } mBufferedSize = readData ; mBufferOffset = 0 ; return true ; }
checks if there is some data left in the buffer . if not but buffered stream still has some data to be read , then more data is buffered .
