throw new IOException("Unable to write file " + fromFile + " on itself.");
}
- BufferedInputStream in = null;
- BufferedOutputStream out = null;
+ InputStream in = null;
+ OutputStream out = null;
try {
- in = new BufferedInputStream(new FileInputStream(fromFile), BUFFER_SIZE);
- out = new BufferedOutputStream(new FileOutputStream(toFile, append), BUFFER_SIZE);
+ in = new FileInputStream( fromFile );
+ in = new BufferedInputStream( in, BUFFER_SIZE );
+ out = new FileOutputStream( toFile, append );
+ out = new BufferedOutputStream( out, BUFFER_SIZE );
IOUtil.redirect( in, out );
} finally {