| java.lang.Object org.jfree.report.util.ImageComparator
ImageComparator | public class ImageComparator (Code) | | The ImageComparator tries to compare a byte[] for equality by creating 2 hashes for the
bytearray and comparing thoose hashes. If no digest algorithms are available, then the
complete byte[] is used for comparison.
Using the digest method trades computing time for space.
author: Thomas Morgner |
Constructor Summary | |
public | ImageComparator() Creates a new ImageComparator. |
ImageComparator | public ImageComparator()(Code) | | Creates a new ImageComparator. The comparator checks whether the MD5 and the SHA
message digest implementations are available. If they are not available, an
alternative comparison method is used, which is more memory consuming.
|
createCompareData | public Object createCompareData(byte[] image, boolean fast)(Code) | | Creates 2 comparable objects. These objects can be compared for equality.
Parameters: image - the image data which should be prepared for comparison Parameters: fast - whether to prefer the memory intensive faster compare method to thedigest based comparation. This may result in outofmemory errors on hugereports or images. the prepared image data. |
|
|