planetj.dataengine.fileupload
Class UploadedFile

java.lang.Object
  |
  +--planetj.database.BlobObject
        |
        +--planetj.dataengine.fileupload.UploadedFile
All Implemented Interfaces:
Blob

public class UploadedFile
extends BlobObject

An UploadedFile contains information about a file that has been uploaded by a user. It can be saved to disk with the save() method.


Constructor Summary
UploadedFile(byte[] content, int maxLength, String contentType, String origFileName)
          Creates a new UploadedFile object.
UploadedFile(byte[] content, String contentType, String origFileName)
          Creates a new UploadedFile object.
 
Method Summary
 String getContentType()
          A String describing the content of the file.
 String getOriginalFileName()
          Gets the name that the file had on the user's file system before it was uploaded.
 
Methods inherited from class planetj.database.BlobObject
byteArraysAreEqual, getBinaryStream, getBytes, getBytes, length, position, position, setBinaryStream, setBytes, setBytes, truncate
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

UploadedFile

public UploadedFile(byte[] content,
                    int maxLength,
                    String contentType,
                    String origFileName)
Creates a new UploadedFile object.


UploadedFile

public UploadedFile(byte[] content,
                    String contentType,
                    String origFileName)
Creates a new UploadedFile object.

Method Detail

getContentType

public String getContentType()
A String describing the content of the file.

Returns:
A String describing the content of the file.

getOriginalFileName

public String getOriginalFileName()
Gets the name that the file had on the user's file system before it was uploaded. No directory/path information is included in this file name.

Returns:
The name the file originally had