private void testFirstNBytes(byte[] byteArray,int n,boolean foundNewScan,int expectedBestScan,int bestScanEndOffset){
  assertEquals(foundNewScan,mProgressiveJpegParser.parseMoreData(buildEncodedImage(new TrivialPooledByteBuffer(Arrays.copyOf(byteArray,n)))));
  assertTrue(mProgressiveJpegParser.isJpeg());
  assertEquals(expectedBestScan,mProgressiveJpegParser.getBestScanNumber());
  assertEquals(bestScanEndOffset,mProgressiveJpegParser.getBestScanEndOffset());
}

private void testFirstNBytes ( byte [ ] byteArray , int n , boolean foundNewScan , int expectedBestScan , int bestScanEndOffset ) { assertEquals ( foundNewScan , mProgressiveJpegParser . parseMoreData ( buildEncodedImage ( new TrivialPooledByteBuffer ( Arrays . copyOf ( byteArray , n ) ) ) ) ) ; assertTrue ( mProgressiveJpegParser . isJpeg ( ) ) ; assertEquals ( expectedBestScan , mProgressiveJpegParser . getBestScanNumber ( ) ) ; assertEquals ( bestScanEndOffset , mProgressiveJpegParser . getBestScanEndOffset ( ) ) ; }
feeds mprogressivejpegparser with n initial bytes from bytearray and checks that
