/** * Method description * * * @param file * * @return * * @throws IOException */ public static String createChecksum(File file) throws IOException { return createChecksum(new FileInputStream(file)); }
/** * Method description * * * @param input * * @return * * @throws IOException */ public static String createChecksum(String input) throws IOException { MessageDigest digest = getDigest(); digest.update(input.getBytes()); return Util.toString(digest.digest()); }
/** * Method description * * * @param input * * @return * * @throws IOException */ public static String createChecksum(String input) throws IOException { MessageDigest digest = getDigest(); digest.update(input.getBytes()); return Util.toString(digest.digest()); }
/** * Method description * * * @param file * * @return * * @throws IOException */ public static String createChecksum(File file) throws IOException { return createChecksum(new FileInputStream(file)); }
digest = getDigest();
/** * Method description * * * @param content * * @return * * @throws IOException * * @since 1.12 */ public static String createChecksum(byte[] content) throws IOException { return createChecksum(new ByteArrayInputStream(content)); }
digest = getDigest();
/** * Method description * * * @param content * * @return * * @throws IOException * * @since 1.12 */ public static String createChecksum(byte[] content) throws IOException { return createChecksum(new ByteArrayInputStream(content)); }
String checksum = ChecksumUtil.createChecksum(archive);
String checksum = ChecksumUtil.createChecksum(archive);
/** * Method description * * * @param archive * @param outputDirectory * * @throws IOException */ private void extractAndCreateProperties(File archive, File outputDirectory) throws IOException { extractArchive(archive, outputDirectory); String checksum = ChecksumUtil.createChecksum(archive); writeProperties(outputDirectory, checksum); }
/** * Method description * * * @param archive * @param outputDirectory * * @throws IOException */ private void extractAndCreateProperties(File archive, File outputDirectory) throws IOException { extractArchive(archive, outputDirectory); String checksum = ChecksumUtil.createChecksum(archive); writeProperties(outputDirectory, checksum); }