public static void compare(final IFileContentResultBean fileContentResultBean,
		final boolean ignoreAbsolutePathEquality, final boolean ignoreExtensionEquality,
		final boolean ignoreLengthEquality, final boolean ignoreLastModified,
		final boolean ignoreNameEquality, final boolean ignoreContentEquality)
	{
		compare(fileContentResultBean, ignoreAbsolutePathEquality, ignoreExtensionEquality,
			ignoreLengthEquality, ignoreLastModified, ignoreNameEquality);
		final File source = fileContentResultBean.getSourceFile();
		final File compare = fileContentResultBean.getFileToCompare();
		if (!ignoreContentEquality)
		{
			boolean contentEquality;
			try
			{
				final String sourceChecksum = ChecksumExtensions.getChecksum(source,
					HashAlgorithm.SHA_512.getAlgorithm());
				final String compareChecksum = ChecksumExtensions.getChecksum(compare,
					HashAlgorithm.SHA_512.getAlgorithm());
				contentEquality = sourceChecksum.equals(compareChecksum);
				fileContentResultBean.setContentEquality(contentEquality);
			}
			catch (final NoSuchAlgorithmException e)
			{
				// if the algorithm is not supported check it with CRC32.
				try
				{
					contentEquality = ChecksumExtensions
						.getCheckSumCRC32(source) == ChecksumExtensions.getCheckSumCRC32(compare);
					fileContentResultBean.setContentEquality(contentEquality);
				}
				catch (IOException e1)
				{
					fileContentResultBean.setContentEquality(false);
				}
			}
			catch (IOException e)
			{
				fileContentResultBean.setContentEquality(false);
			}
		}
		else
		{
			fileContentResultBean.setContentEquality(true);
		}
	}
public static void compare ( final IFileContentResultBean fileContentResultBean , final boolean ignoreAbsolutePathEquality , final boolean ignoreExtensionEquality , final boolean ignoreLengthEquality , final boolean ignoreLastModified , final boolean ignoreNameEquality , final boolean ignoreContentEquality ) { compare ( fileContentResultBean , ignoreAbsolutePathEquality , ignoreExtensionEquality , ignoreLengthEquality , ignoreLastModified , ignoreNameEquality ) ; final File source = fileContentResultBean . getSourceFile ( ) ; final File compare = fileContentResultBean . getFileToCompare ( ) ; if ( ! ignoreContentEquality ) { boolean contentEquality ; try { final String sourceChecksum = ChecksumExtensions . getChecksum ( source , HashAlgorithm . SHA_512 . getAlgorithm ( ) ) ; final String compareChecksum = ChecksumExtensions . getChecksum ( compare , HashAlgorithm . SHA_512 . getAlgorithm ( ) ) ; contentEquality = sourceChecksum . equals ( compareChecksum ) ; fileContentResultBean . setContentEquality ( contentEquality ) ; } catch ( final NoSuchAlgorithmException e ) { try { contentEquality = ChecksumExtensions . getCheckSumCRC32 ( source ) == ChecksumExtensions . getCheckSumCRC32 ( compare ) ; fileContentResultBean . setContentEquality ( contentEquality ) ; } catch ( IOException e1 ) { fileContentResultBean . setContentEquality ( false ) ; } } catch ( IOException e ) { fileContentResultBean . setContentEquality ( false ) ; } } else { fileContentResultBean . setContentEquality ( true ) ; } }
Sets the flags in the FileContentResultBean object according to the given boolean flag what
to ignore.

@param fileContentResultBean
The FileContentResultBean.
@param ignoreAbsolutePathEquality
If this is true then the absolute path equality will be ignored.
@param ignoreExtensionEquality
If this is true then the extension equality will be ignored.
@param ignoreLengthEquality
If this is true then the length equality will be ignored.
@param ignoreLastModified
If this is true then the last modified equality will be ignored.
@param ignoreNameEquality
If this is true then the name equality will be ignored.
@param ignoreContentEquality
If this is true then the content equality will be ignored.