On Wed, 20 Oct 2004 11:27:40 -0700 (PDT), Joe Smith <[EMAIL PROTECTED]> wrote:
> 
> If FileItem.getSize() == 0, it means either
> 1) The file doesn't exist
> 2) The file exists, but empty file.

This isn't completely accurate. The fact that the FileItem exists
means that the client (usually a browser) submitted a multipart part
for it. If the size is zero, as determined by getSize(), then the
client submitted a zero-length part (i.e. submitted no data for that
part).

Recall that a FileItem may or may not be backed by a file in the file
system. That is determined by the particular FileItem implementation.
The default implementation stores file item data on disk only if the
size exceeds a configurable threshold, which all but precludes empty
files.

--
Martin Cooper


> 
> My question is if there are other ways to distinguish 2 cases?
> 
> Please advise. Thanks!!
> 
> 
> ---------------------------------
> Do you Yahoo!?
> vote.yahoo.com - Register online to vote today!
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to