com.mizar.trinidad.components
Class MizarFileUpload

java.lang.Object
  extended by com.mizar.trinidad.components.MizarFileUpload
All Implemented Interfaces:
org.apache.myfaces.trinidad.model.UploadedFile

public class MizarFileUpload
extends java.lang.Object
implements org.apache.myfaces.trinidad.model.UploadedFile


Constructor Summary
MizarFileUpload()
           
 
Method Summary
 void dispose()
          Disposes of all resources used to store this file.
 boolean equals(java.lang.Object o)
           
 java.lang.String getContentType()
          Returns the MIME type of the file.
 java.lang.String getFilename()
          Returns the filename reported from 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()
           
 int hashCode()
           
 void loadFile(org.apache.myfaces.trinidad.model.UploadedFile file, long remainingMemory, long remainingDiskSpace, java.lang.String directory)
          Loads the file from a MultipartFormItem.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MizarFileUpload

public MizarFileUpload()
Method Detail

getFilename

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

Specified by:
getFilename in interface org.apache.myfaces.trinidad.model.UploadedFile

getContentType

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

Specified by:
getContentType in interface org.apache.myfaces.trinidad.model.UploadedFile

getLength

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

Specified by:
getLength in interface org.apache.myfaces.trinidad.model.UploadedFile

getOpaqueData

public java.lang.Object getOpaqueData()
Specified by:
getOpaqueData in interface org.apache.myfaces.trinidad.model.UploadedFile

getInputStream

public 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.

Specified by:
getInputStream in interface org.apache.myfaces.trinidad.model.UploadedFile
Throws:
java.io.IOException

dispose

public void dispose()
Disposes of all resources used to store this file.

Specified by:
dispose in interface org.apache.myfaces.trinidad.model.UploadedFile

loadFile

public void loadFile(org.apache.myfaces.trinidad.model.UploadedFile file,
                     long remainingMemory,
                     long remainingDiskSpace,
                     java.lang.String directory)
              throws java.io.IOException
Loads the file from a MultipartFormItem.

Throws:
java.io.IOException

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

equals

public boolean equals(java.lang.Object o)
Overrides:
equals in class java.lang.Object