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);
    }
  }
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.

@param reader
The source stream.
@param writer
The destination stream.
@throws IOException
If content cannot be copy.
Copy and close the reader and writer streams .