daily pastebin goal
41%
SHARE
TWEET

Untitled

a guest Jan 18th, 2019 50 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. int lenghtBytes = 1024 * 1024;
  2. File outFile = this.file.getDossier ();
  3. out = new FileOutputStream (outFile);
  4. this.panel.jProgressBarTransfert.setMaximum (100);
  5. byte [] buffer = new byte [lenghtBytes];
  6. int l;
  7. long bitTransfered = 0;
  8.  
  9. while ((l = in.read (buffer, 0, buffer.length))! = -1) {
  10. out.write (buffer, 0, l); // We write on the disc.
  11. bitTransfered + = l; // Update the number of bits transferred.
  12. this.update (bitTransfered, httpResponse.getEntity (). getContentLength ());
  13. }
  14. in.close ();
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top