Back to Fresco

ProgressiveJpegParser

docs/javadoc/reference/com/facebook/imagepipeline/decoder/ProgressiveJpegParser.html

3.6.013.4 KB
Original Source

Fresco

|

|

Packages | Classes

Interfaces

Classes

Exceptions

Packages | Classes

Summary: Ctors | Methods | Inherited Methods | [Expand All]

public class

ProgressiveJpegParser

extends Object

| java.lang.Object | | ↳ | com.facebook.imagepipeline.decoder.ProgressiveJpegParser |

Class Overview

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.

Summary

Public Constructors
Public Methods
int
int
boolean
Returns true if the end marker has been read.
boolean
boolean
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

| Object | clone() | | boolean | equals(Object arg0) | | void | finalize() | | final Class<?> | getClass() | | int | hashCode() | | final void | notify() | | final void | notifyAll() | | String | toString() | | final void | wait(long arg0, int arg1) | | final void | wait(long arg0) | | final void | wait() |

|

Public Constructors

public ProgressiveJpegParser(ByteArrayPool byteArrayPool)

Public Methods

public int getBestScanEndOffset()

Returns
  • offset at which parsed data should be cut to decode best available partial result

public int getBestScanNumber()

Returns
  • number of the best scan found so far

public boolean isEndMarkerRead()

Returns true if the end marker has been read.

public boolean isJpeg()

public 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). 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.

Parameters

| encodedImage | Next set of bytes received by the caller |

Returns
  • true if a new full scan has been found

+Generated by Doclava. +