Skip to content

Commit 0d5090b

Browse files
committed
by getmd5hash
1 parent 5765c64 commit 0d5090b

1 file changed

Lines changed: 0 additions & 17 deletions

File tree

src/org/labkey/test/TestFileUtils.java

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -64,8 +64,6 @@
6464
import java.nio.file.Paths;
6565
import java.nio.file.SimpleFileVisitor;
6666
import java.nio.file.attribute.BasicFileAttributes;
67-
import java.security.MessageDigest;
68-
import java.security.NoSuchAlgorithmException;
6967
import java.security.Security;
7068
import java.util.ArrayList;
7169
import java.util.Arrays;
@@ -122,21 +120,6 @@ public static String getFileContents(Path path)
122120
}
123121
}
124122

125-
/**
126-
* Compute MD5 hash for the given file. Useful checking file equivalence.
127-
*/
128-
public static String getMD5Hash(Path path)
129-
{
130-
try
131-
{
132-
return new String(MessageDigest.getInstance("MD5").digest(Files.readAllBytes(path)), StandardCharsets.UTF_8);
133-
}
134-
catch (IOException | NoSuchAlgorithmException fail)
135-
{
136-
throw new RuntimeException(fail);
137-
}
138-
}
139-
140123
public static String getStreamContentsAsString(InputStream is) throws IOException
141124
{
142125
return StringUtils.join(IOUtils.readLines(is, Charset.defaultCharset()).toArray(), System.lineSeparator());

0 commit comments

Comments
 (0)