Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- private void copy(InputStream in, File file) {
- try {
- OutputStream out = new FileOutputStream(file);
- byte[] buf = new byte[1024];
- int len;
- while((len=in.read(buf))>0){
- out.write(buf,0,len);
- }
- out.close();
- in.close();
- } catch (Exception e) {
- System.out.println("[WorldWrap] Error generating a new config! Is the directory writeable?");
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment