try { InputStream in = new FileInputStream("C:\\tmp\\org.txt"); OutputStream out = new FileOutputStream("C:\\tmp\\copy.txt"); CopyUtils.copy(in, out); } catch (Exception e) { e.printStackTrace(); } InputStream in = null; try { in = new URL("http://www.moriwaki.net/wiki/").openStream(); System.out.println(IOUtils.toString(in)); } catch (Exception e) { e.printStackTrace(); } finally { IOUtils.closeQ