Searched refs:inputSource (Results 1 – 4 of 4) sorted by relevance
156 ByteArrayInputStream inputSource = new ByteArrayInputStream(source.getBytes()); in testCalculateCrc32() local157 long actualCrc32 = StreamUtil.calculateCrc32(inputSource); in testCalculateCrc32()171 ByteArrayInputStream inputSource = new ByteArrayInputStream(source.getBytes()); in testCalculateMd5() local172 String actualMd5 = StreamUtil.calculateMd5(inputSource); in testCalculateMd5()186 ByteArrayInputStream inputSource = new ByteArrayInputStream(source.getBytes()); in testCalculateBase64Md5() local187 String actualBase64Md5 = StreamUtil.calculateBase64Md5(inputSource); in testCalculateBase64Md5()
428 public static String calculateMd5(InputStream inputSource) throws IOException { in calculateMd5() argument429 return bytesToHexString(calculateMd5Digest(inputSource)); in calculateMd5()440 public static String calculateBase64Md5(InputStream inputSource) throws IOException { in calculateBase64Md5() argument441 return Base64.getEncoder().encodeToString(calculateMd5Digest(inputSource)); in calculateBase64Md5()444 private static byte[] calculateMd5Digest(InputStream inputSource) throws IOException { in calculateMd5Digest() argument452 InputStream input = new BufferedInputStream(new DigestInputStream(inputSource, md)); in calculateMd5Digest()
1187 try (BufferedInputStream inputSource = new BufferedInputStream(new FileInputStream(file))) { in calculateCrc32() argument1188 return StreamUtil.calculateCrc32(inputSource); in calculateCrc32()1200 try (FileInputStream inputSource = new FileInputStream(file)) { in calculateMd5() argument1201 return StreamUtil.calculateMd5(inputSource); in calculateMd5()1221 try (FileInputStream inputSource = new FileInputStream(file)) { in calculateBase64Md5() argument1222 return StreamUtil.calculateBase64Md5(inputSource); in calculateBase64Md5()
867 InputSource inputSource = new InputSource(new StringReader(xml)); in getXmlNodes() local869 return (NodeList) xpath.evaluate(xPathExpression, inputSource, XPathConstants.NODESET); in getXmlNodes()