planetj.dataengine.fileupload
Class UploadedFile

java.lang.Object
  extended byplanetj.database.BlobObject
      extended byplanetj.dataengine.fileupload.UploadedFile
All Implemented Interfaces:
java.sql.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, java.lang.String contentType, java.lang.String origFileName)
          Creates a new UploadedFile object.
UploadedFile(byte[] content, java.lang.String contentType, java.lang.String origFileName)
          Creates a new UploadedFile object.
 
Method Summary
 java.lang.String getContentType()
          A String describing the content of the file.
 java.lang.String getOriginalFileName()
          Gets the name that the file had on the user's file system before it was uploaded.
protected  void setContentType(java.lang.String newContentType)
          Insert the method's description here.
protected  void setOriginalFileName(java.lang.String newOriginalFileName)
          Insert the method's description here.
 
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
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

UploadedFile

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


UploadedFile

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

Method Detail

getContentType

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

Returns:
A String describing the content of the file.

getOriginalFileName

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

setContentType

protected void setContentType(java.lang.String newContentType)
Insert the method's description here. Creation date: (5/30/01 3:40:40 PM)

Parameters:
newContentType - java.lang.String

setOriginalFileName

protected void setOriginalFileName(java.lang.String newOriginalFileName)
Insert the method's description here. Creation date: (5/30/01 3:40:40 PM)

Parameters:
newOriginalFileName - java.lang.String