java.lang.Object | |
↳ | com.facebook.imagepipeline.decoder.ProgressiveJpegParser |
Progressively scans jpeg data and instructs caller when enough data is available to decode a partial image.
This class treats any sequence of bytes starting with 0xFFD8 as a valid jpeg image
Users should call parseMoreData method each time new chunk of data is received. The buffer passed as a parameter should include entire image data received so far.
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
ProgressiveJpegParser(ByteArrayPool byteArrayPool) |
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
int | getBestScanEndOffset() | ||||||||||
int | getBestScanNumber() | ||||||||||
boolean |
isEndMarkerRead()
Returns true if the end marker has been read.
| ||||||||||
boolean | isJpeg() | ||||||||||
boolean |
parseMoreData(EncodedImage encodedImage)
If this is the first time calling this method, the buffer will be checked to make sure it
starts with SOI marker (0xffd8).
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
java.lang.Object
|
Returns true if the end marker has been read.
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.
encodedImage | Next set of bytes received by the caller |
---|