org.ow2.opensuit.core.impl.multiparts
Interface IFileUploadPart

All Superinterfaces:
IPart

public interface IFileUploadPart
extends IPart


Method Summary
 java.lang.String getFileContentType()
          Returns the uploading file content-type.
 java.io.InputStream getFileInputStream()
          Returns the uploading file input stream.
 java.lang.String getFileName()
          Returns the uploading file name.
 boolean isEmptyStream()
          Determines whether if the uploading file looks invalid or not.
 
Methods inherited from interface org.ow2.opensuit.core.impl.multiparts.IPart
getInputName
 

Method Detail

getFileName

java.lang.String getFileName()
Returns the uploading file name.

Returns:
the uploading file name.

getFileContentType

java.lang.String getFileContentType()
Returns the uploading file content-type.

Returns:
the uploading file content-type.

getFileInputStream

java.io.InputStream getFileInputStream()
Returns the uploading file input stream.

Returns:
the uploading file input stream.

isEmptyStream

boolean isEmptyStream()
Determines whether if the uploading file looks invalid or not.

This method checks first if the filename is null, and then if the stream is empty (zero bytes).
Obviously a non-null filename with a non-null stream size is never considered invalid.
Note: A genuine empty file would then appear invalid. This is a limitation of upload client platforms (web browsers).

Returns:
true if the filename is null or if the file is empty (zero bytes).


Copyright © 2008-2012 OW2 Consortium. All Rights Reserved.