Package org.apache.commons.imaging
Class FormatCompliance
- java.lang.Object
 - 
- org.apache.commons.imaging.FormatCompliance
 
 
- 
public class FormatCompliance extends java.lang.ObjectProvides information about the compliance of a specified data source (byte array, file, etc.) to an image format. 
- 
- 
Constructor Summary
Constructors Constructor Description FormatCompliance(java.lang.String description)FormatCompliance(java.lang.String description, boolean failOnError) 
- 
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddComment(java.lang.String comment)voidaddComment(java.lang.String comment, int value)booleancheckBounds(java.lang.String name, int min, int max, int actual)booleancompare(java.lang.String name, int[] valid, int actual)booleancompare(java.lang.String name, int valid, int actual)booleancompareBytes(java.lang.String name, byte[] expected, byte[] actual)voiddump()voiddump(java.io.PrintWriter pw)static FormatCompliancegetDefault()java.lang.StringtoString() 
 - 
 
- 
- 
Method Detail
- 
getDefault
public static FormatCompliance getDefault()
 
- 
addComment
public void addComment(java.lang.String comment) throws ImageReadException- Throws:
 ImageReadException
 
- 
addComment
public void addComment(java.lang.String comment, int value) throws ImageReadException- Throws:
 ImageReadException
 
- 
toString
public java.lang.String toString()
- Overrides:
 toStringin classjava.lang.Object
 
- 
dump
public void dump()
 
- 
dump
public void dump(java.io.PrintWriter pw)
 
- 
compareBytes
public boolean compareBytes(java.lang.String name, byte[] expected, byte[] actual) throws ImageReadException- Throws:
 ImageReadException
 
- 
checkBounds
public boolean checkBounds(java.lang.String name, int min, int max, int actual) throws ImageReadException- Throws:
 ImageReadException
 
- 
compare
public boolean compare(java.lang.String name, int valid, int actual) throws ImageReadException- Throws:
 ImageReadException
 
- 
compare
public boolean compare(java.lang.String name, int[] valid, int actual) throws ImageReadException- Throws:
 ImageReadException
 
 - 
 
 -