protected long copyClose ( InputStream in , OutputStream out ) throws IOException { try { try { return copy ( in , out ) ; } finally { in . close ( ) ; } } finally { out . close ( ) ; } }
Copy input to output data using NIO . Input and output streams will be closed after the operation .