public boolean parseMoreData(final EncodedImage encodedImage){
  if (mParserState == NOT_A_JPEG) {
    return false;
  }
  final int dataBufferSize=encodedImage.getSize();
  if (dataBufferSize <= mBytesParsed) {
    return false;
  }
  final InputStream bufferedDataStream=new PooledByteArrayBufferedInputStream(encodedImage.getInputStream(),mByteArrayPool.get(BUFFER_SIZE),mByteArrayPool);
  try {
    StreamUtil.skip(bufferedDataStream,mBytesParsed);
    return doParseMoreData(bufferedDataStream);
  }
 catch (  IOException ioe) {
    Throwables.propagate(ioe);
    return false;
  }
 finally {
    Closeables.closeQuietly(bufferedDataStream);
  }
}

public boolean parseMoreData ( final EncodedImage encodedImage ) { if ( mParserState == NOT_A_JPEG ) { return false ; } final int dataBufferSize = encodedImage . getSize ( ) ; if ( dataBufferSize <= mBytesParsed ) { return false ; } final InputStream bufferedDataStream = new PooledByteArrayBufferedInputStream ( encodedImage . getInputStream ( ) , mByteArrayPool . get ( BUFFER_SIZE ) , mByteArrayPool ) ; try { StreamUtil . skip ( bufferedDataStream , mBytesParsed ) ; return doParseMoreData ( bufferedDataStream ) ; } catch ( IOException ioe ) { Throwables . propagate ( ioe ) ; return false ; } finally { Closeables . closeQuietly ( bufferedDataStream ) ; } }
if this is the first time calling this method , the buffer will be checked to make sure it starts with soi marker ( 0xffd8 ) . if the image has been identified as a non - jpeg , data will be ignored and false will be returned immediately on all subsequent calls . this object maintains state of the position of the last read byte . on repeated calls to this method , it will continue from where it left off .
