You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by Steven Caswell <st...@yahoo.com> on 2002/02/19 22:58:33 UTC

[IO] proposal to make the following changes to FileUtils

I propose making the following changes to FileUtils:

1. Change the fileRead method to estimate the size of the file content
and instantiate the StringBuffer with this size.
2. Change the return of fileRead to be StringBuffer.  IMHO this is a
little more flexible in that the caller can more easily manipulate a
StringBuffer, and if the caller wants it as a String, can easily invoke
toString().
3. Add an overloaded fileWrite method accepting the data to be written
as a byte array rather than a String.
4. Add a copyFile(String sourceFileName, String targetFileName) that
makes a copy of the source file into the destination.

These are all things I have in my own private common area and can easily
provide to commons-io


Steven Caswell
stevencaswell@yahoo.com
a.k.a Mungo Knotwise of Michel Delving
"One ring to rule them all, one ring to find them..."