h31ix

Untitled

Jan 25th, 2012
97
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.43 KB | None | 0 0
  1. private void copy(InputStream in, File file) {
  2. try {
  3. OutputStream out = new FileOutputStream(file);
  4. byte[] buf = new byte[1024];
  5. int len;
  6. while((len=in.read(buf))>0){
  7. out.write(buf,0,len);
  8. }
  9. out.close();
  10. in.close();
  11. } catch (Exception e) {
  12. System.out.println("[WorldWrap] Error generating a new config! Is the directory writeable?");
  13. }
  14. }
Advertisement
Add Comment
Please, Sign In to add comment