Created
May 17, 2019 10:12
-
-
Save cdsap/c476a88242d3d34719103b81a09d57d0 to your computer and use it in GitHub Desktop.
GenerateMD5
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class GenerateMD5 @Inject constructor( | |
private val sourceFile: File, | |
private val md5File: File) | |
: Runnable { | |
override fun run() { | |
try { | |
val stream = FileInputStream(sourceFile) | |
Thread.sleep(3000) | |
FileUtils.writeStringToFile(md5File, DigestUtils.md5Hex(stream), null as String?) | |
} catch (e: Exception) { | |
throw RuntimeException(e) | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment