public class

DefaultImageFormatChecker

extends Object
implements ImageFormat.FormatChecker
java.lang.Object
   ↳ com.facebook.imageformat.DefaultImageFormatChecker

Class Overview

Default image format checker that is able to determine all DefaultImageFormats.

Summary

Public Constructors
DefaultImageFormatChecker()
Public Methods
final ImageFormat determineFormat(byte[] headerBytes, int headerSize)
Tries to match imageHeaderByte and headerSize against every known image format.
int getHeaderSize()
Get the number of header bytes the format checker requires
[Expand]
Inherited Methods
From class java.lang.Object
From interface com.facebook.imageformat.ImageFormat.FormatChecker

Public Constructors

public DefaultImageFormatChecker ()

Public Methods

public final ImageFormat determineFormat (byte[] headerBytes, int headerSize)

Tries to match imageHeaderByte and headerSize against every known image format. If any match succeeds, corresponding ImageFormat is returned.

Parameters
headerBytes the header bytes to check
headerSize the available header size
Returns
  • ImageFormat for given imageHeaderBytes or UNKNOWN if no such type could be recognized

public int getHeaderSize ()

Get the number of header bytes the format checker requires

Returns
  • the number of header bytes needed