org.objectweb.telosys.upload
Class FileUploaded

java.lang.Object
  extended byorg.objectweb.telosys.upload.FileUploaded

public class FileUploaded
extends java.lang.Object

A representation of a file uploaded on the server by a multpart http request


Constructor Summary
FileUploaded(java.lang.String fileName, byte[] data, java.lang.String sFileType, long maxSizeUsed, java.lang.String destDir, UploadParameters uploadParam)
          Constructor
 
Method Summary
 byte[] getData()
          Returns the data of the file uploaded
 long getDataSize()
          Returns the size of the data ( in bytes )
 java.lang.String getDestDir()
          Returns the destination directory ( where to save the file on the server side )
 java.lang.String getFileName()
          Returns the name of the file uploaded
 java.lang.String getFileType()
          Returns the content type of the file uploaded ( i.e.
 long getMaxSizeUsed()
          Returns the maximum size used when the file data has been loaded in memory
 java.lang.String getParamContextAttribute()
          Returns the "contextattribute" parameter ( see tag : contextattribute="..." )
 int getParamContextId()
          Returns the "contextid" parameter ( see tag : contextid="..." )
 java.lang.String getParamDestDir()
          Returns the "destdir" parameter ( see tag : destdir="..." )
 long getParamMaxSize()
          Returns the "maxsize" parameter ( see tag : maxsize="..." )
 java.lang.String getParamSessionKey()
          Returns the "sessionkey" parameter ( see tag : sessionkey="..." )
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FileUploaded

public FileUploaded(java.lang.String fileName,
                    byte[] data,
                    java.lang.String sFileType,
                    long maxSizeUsed,
                    java.lang.String destDir,
                    UploadParameters uploadParam)
Constructor

Parameters:
fileName -
data -
sFileType -
maxSizeUsed -
destDir -
uploadParam -
Method Detail

getData

public byte[] getData()
Returns the data of the file uploaded

Returns:
the file data ( bytes array )

getDataSize

public long getDataSize()
Returns the size of the data ( in bytes )

Returns:

getFileName

public java.lang.String getFileName()
Returns the name of the file uploaded

Returns:

getFileType

public java.lang.String getFileType()
Returns the content type of the file uploaded ( i.e. "text/plain", ... )

Returns:

getMaxSizeUsed

public long getMaxSizeUsed()
Returns the maximum size used when the file data has been loaded in memory

Returns:

getDestDir

public java.lang.String getDestDir()
Returns the destination directory ( where to save the file on the server side )

Returns:

getParamDestDir

public java.lang.String getParamDestDir()
Returns the "destdir" parameter ( see tag : destdir="..." )

Returns:
the destination directory ( or null if not set )

getParamMaxSize

public long getParamMaxSize()
Returns the "maxsize" parameter ( see tag : maxsize="..." )

Returns:
the maximum size ( or -1 if not set )

getParamSessionKey

public java.lang.String getParamSessionKey()
Returns the "sessionkey" parameter ( see tag : sessionkey="..." )

Returns:
the session key ( or null if not set )

getParamContextId

public int getParamContextId()
Returns the "contextid" parameter ( see tag : contextid="..." )

Returns:
the context id ( or -1 if not set )

getParamContextAttribute

public java.lang.String getParamContextAttribute()
Returns the "contextattribute" parameter ( see tag : contextattribute="..." )

Returns:
the context attribute ( or null if not set )