title: How to get File both MD5 and SHA1 checksum at the same time when upload a new file?
body: <p>I am working on a storage system. Users upload files to the server. </p>
  
  <p>On the server side, I want to implement a program to get the checksums of the file using both MD5 and SHA1. </p>
  
  <p>I know how to calculate checksums using DigestInputStream functions, but it seems only supports one method (either MD5 or SHA1) a time. 
  How can I calculate both MD5 and SHA1 a the same time when dealing with the upload stream in JAVA? </p>
  
  <p>Thanks guys</p>