On Sunday 13 May 2001 17:29, you wrote:
> jvanzyl 01/05/13 17:29:48
>
> Modified: src/java/org/apache/turbine/util/upload FileItem.java
> Log:
> - adding convenience method to write() the contents of the uploaded
> file to disk. instead of having to mess around now you just do
> the following:
>
> FileItem fileItem = data.getParameters().getFileItem("file");
> fileItem.write("/tmp/junk");
>
> returns a boolean so you can check to make sure the file
> was actually written to disk.
Seems to me that it would be more "Java" to throw an exception if file was
not written successfully. I would return the fileItem object, a File object
or just void...
just my 2c
Fedor
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]