Skip to content

Instantly share code, notes, and snippets.

@fpereira1
Last active September 25, 2015 01:10
Show Gist options
  • Save fpereira1/bca6f0e62dbe43a75faa to your computer and use it in GitHub Desktop.
Save fpereira1/bca6f0e62dbe43a75faa to your computer and use it in GitHub Desktop.
Testing
import java.io.*;
public class CopyFile {
public static void main(String args[]) throws IOException
{
FileInputStream in = null;
FileOutputStream out = null;
try {
in = new FileInputStream("input.txt");
out = new FileOutputStream("output.txt");
int c;
while ((c = in.read()) != -1) {
out.write(c);
}
}finally {
if (in != null) {
in.close();
}
if (out != null) {
out.close();
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment