Package org.apache.commons.imaging

# Class FormatCompliance

java.lang.Object
org.apache.commons.imaging.FormatCompliance

public class FormatCompliance extends Object
Provides information about the compliance of a specified data source (byte array, file, etc.) to an image format.

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `FormatCompliance(String description)`
  `FormatCompliance(String description, boolean failOnError)`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `void`
  `addComment(String comment)`
  `void`
  `addComment(String comment, int value)`
  `boolean`
  `checkBounds(String name, int min, int max, int actual)`
  `boolean`
  `compare(String name, int[] valid, int actual)`
  `boolean`
  `compare(String name, int valid, int actual)`
  `boolean`
  `compareBytes(String name, byte[] expected, byte[] actual)`
  `void`
  `dump()`
  `void`
  `dump(PrintWriter pw)`
  `static FormatCompliance`
  `getDefault()`
  `String`
  `toString()`

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- ## Constructor Details

  - ### FormatCompliance

    public FormatCompliance(String description)

  - ### FormatCompliance

    public FormatCompliance(String description, boolean failOnError)

- ## Method Details

  - ### getDefault

    public static FormatCompliance getDefault()

  - ### addComment

    public void addComment(String comment) throws ImagingException
    Throws:
      `ImagingException`

  - ### addComment

    public void addComment(String comment, int value) throws ImagingException
    Throws:
      `ImagingException`

  - ### checkBounds

    public boolean checkBounds(String name, int min, int max, int actual) throws ImagingException
    Throws:
      `ImagingException`

  - ### compare

    public boolean compare(String name, int valid, int actual) throws ImagingException
    Throws:
      `ImagingException`

  - ### compare

    public boolean compare(String name, int[] valid, int actual) throws ImagingException
    Throws:
      `ImagingException`

  - ### compareBytes

    public boolean compareBytes(String name, byte[] expected, byte[] actual) throws ImagingException
    Throws:
      `ImagingException`

  - ### dump

    public void dump()

  - ### dump

    public void dump(PrintWriter pw)

  - ### toString

    public String toString()
    Overrides:
      `toString` in class `Object`