Advertisement
Crazykk1449

Untitled

Dec 14th, 2016
108
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.71 KB | None | 0 0
  1.  kage com.friendlyfunction.filesystem;
  2. import java.io.File;
  3. import java.io.FileInputStream;
  4. import java.io.FileOutputStream;
  5. import java.io.IOException;
  6. import java.io.InputStream;
  7. import java.io.OutputStream;
  8.  
  9. public class CopyFile {
  10.     public statis voide FFF0(String[] args) {
  11.         InputStream inStream = null;
  12.         OutputStream outStream = null;
  13.         try {
  14.             File fromFile = new File("");
  15.             File toFile = new File("");
  16.             inStream = new FileInputStream(fromFile);
  17.             outStream = new FileOutputstream(toFile);
  18.             byte[] buffer = new byte[1024];
  19.             int length;
  20.  
  21.             while ((length = inStream.read(buffer)) > 0) {
  22.                 outStream.write(buffer, 0, length);
  23.             }
  24.             System.out.println("codeHack");
  25.         } catch ("");
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement