Home
last modified time | relevance | path

Searched refs:inputSource (Results 1 – 4 of 4) sorted by relevance

/tools/tradefederation/core/tests/src/com/android/tradefed/util/
DStreamUtilTest.java143 ByteArrayInputStream inputSource = new ByteArrayInputStream(source.getBytes()); in testCalculateCrc32() local
144 long actualCrc32 = StreamUtil.calculateCrc32(inputSource); in testCalculateCrc32()
157 ByteArrayInputStream inputSource = new ByteArrayInputStream(source.getBytes()); in testCalculateMd5() local
158 String actualMd5 = StreamUtil.calculateMd5(inputSource); in testCalculateMd5()
171 ByteArrayInputStream inputSource = new ByteArrayInputStream(source.getBytes()); in testCalculateBase64Md5() local
172 String actualBase64Md5 = StreamUtil.calculateBase64Md5(inputSource); in testCalculateBase64Md5()
/tools/tradefederation/core/common_util/com/android/tradefed/util/
DStreamUtil.java419 public static String calculateMd5(InputStream inputSource) throws IOException { in calculateMd5() argument
420 return bytesToHexString(calculateMd5Digest(inputSource)); in calculateMd5()
431 public static String calculateBase64Md5(InputStream inputSource) throws IOException { in calculateBase64Md5() argument
432 return Base64.getEncoder().encodeToString(calculateMd5Digest(inputSource)); in calculateBase64Md5()
435 private static byte[] calculateMd5Digest(InputStream inputSource) throws IOException { in calculateMd5Digest() argument
443 InputStream input = new BufferedInputStream(new DigestInputStream(inputSource, md)); in calculateMd5Digest()
DFileUtil.java1068 try (BufferedInputStream inputSource = new BufferedInputStream(new FileInputStream(file))) { in calculateCrc32() argument
1069 return StreamUtil.calculateCrc32(inputSource); in calculateCrc32()
1081 FileInputStream inputSource = new FileInputStream(file); in calculateMd5() local
1082 return StreamUtil.calculateMd5(inputSource); in calculateMd5()
1093 FileInputStream inputSource = new FileInputStream(file); in calculateBase64Md5() local
1094 return StreamUtil.calculateBase64Md5(inputSource); in calculateBase64Md5()
/tools/tradefederation/core/tests/src/com/android/tradefed/result/suite/
DXmlSuiteResultFormatterTest.java708 InputSource inputSource = new InputSource(new StringReader(xml)); in getXmlNodes() local
710 return (NodeList) xpath.evaluate(xPathExpression, inputSource, XPathConstants.NODESET); in getXmlNodes()