public static void safeCopy(final Reader reader,final Writer writer) throws IOException {
  try {
    IOUtils.copy(reader,writer);
  }
  finally {
    IOUtils.closeQuietly(reader);
    IOUtils.closeQuietly(writer);
  }
}

public static void safeCopy ( final Reader reader , final Writer writer ) throws IOException { try { IOUtils . copy ( reader , writer ) ; } finally { IOUtils . closeQuietly ( reader ) ; IOUtils . closeQuietly ( writer ) ; } }
copy and close the reader and writer streams .
