Lines Matching refs:Checksum
35 import java.util.zip.Checksum;
59 * <li>calculating a checksum
1666 * Computes the checksum of a file using the CRC32 checksum routine.
1667 * The value of the checksum is returned.
1669 * @param file the file to checksum, must not be <code>null</code>
1670 * @return the checksum value
1671 * @throws NullPointerException if the file or checksum is <code>null</code>
1678 checksum(file, crc);
1683 * Computes the checksum of a file using the specified checksum object.
1684 * Multiple files may be checked using one <code>Checksum</code> instance
1685 * if desired simply by reusing the same checksum object.
1688 * long csum = FileUtils.checksum(file, new CRC32()).getValue();
1691 * @param file the file to checksum, must not be <code>null</code>
1692 * @param checksum the checksum object to be used, must not be <code>null</code>
1693 * @return the checksum specified, updated with the content of the file
1694 * @throws NullPointerException if the file or checksum is <code>null</code>
1699 public static Checksum checksum(File file, Checksum checksum) throws IOException {
1705 in = new CheckedInputStream(new FileInputStream(file), checksum);
1710 return checksum;