commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Timo Rumland <>
Subject [io] Should "FileUtils.writeByteArrayToFile(...)" not use a BufferedOutputStream?
Date Tue, 20 Sep 2011 21:27:39 GMT

I recently started using the FileUtils class of Commons IO, and had a
quick look into the source code.

The method "FileUtils.writeByteArrayToFile(...)" internally uses the
private method "openOutputStream(...)", which creates (after some
smart checks) an FileOutputStream.

But, shouldn't "writeByteArrayToFile(...)" or "openOutputStream(...)"
not use/create a BufferedOutputStream, wrapping the FileOutputStream?

Or do I overlook something?

I think one should always buffer the bytes when writing to a file...

Any thoughts?

Thanks !

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message