org.apache.myfaces.trinidad.model
Interface UploadedFile


public interface UploadedFile

Interface that describes the contents of a single file.

See Also:
CoreInputFile

Method Summary
 void dispose()
          Disposes all resources allocated for this file.
 java.lang.String getContentType()
          Returns the MIME type of the file.
 java.lang.String getFilename()
          Returns the filename reported by the client.
 java.io.InputStream getInputStream()
          Returns an InputStream that can be used to read the file.
 long getLength()
          Returns the total length (in bytes) of the file.
 java.lang.Object getOpaqueData()
          Return opaque data associated with the file when it was processed by the UploadedFileProcessor.
 

Method Detail

getFilename

java.lang.String getFilename()
Returns the filename reported by the client.


getContentType

java.lang.String getContentType()
Returns the MIME type of the file.


getLength

long getLength()
Returns the total length (in bytes) of the file.


getOpaqueData

java.lang.Object getOpaqueData()
Return opaque data associated with the file when it was processed by the UploadedFileProcessor. This is always null with the default UploadedFileProcessor, but custom implementations may use this to pass additional information needed for later processing. (Note that Apache Trinidad cannot cannot guarantee that the instance returned from code>UploadedFileProcessor is the same one made available later.


getInputStream

java.io.InputStream getInputStream()
                                   throws java.io.IOException
Returns an InputStream that can be used to read the file. This method can be called repeatedly.

Throws:
java.io.IOException

dispose

void dispose()
Disposes all resources allocated for this file.



Copyright © 2001-2008 The Apache Software Foundation. All Rights Reserved.