org.melati.servlet
Class TemporaryFileDataAdaptor

java.lang.Object
  extended by org.melati.servlet.BaseFileDataAdaptor
      extended by org.melati.servlet.TemporaryFileDataAdaptor
All Implemented Interfaces:
FormDataAdaptor

public class TemporaryFileDataAdaptor
extends BaseFileDataAdaptor

Save uploaded files in a temporary file which is deleted when the JVM exits.


Field Summary
 
Fields inherited from class org.melati.servlet.BaseFileDataAdaptor
BUFSIZE, field, file, url
 
Constructor Summary
TemporaryFileDataAdaptor()
          Constructor.
TemporaryFileDataAdaptor(java.lang.String temporaryFileName)
          Constructor specifying temporary file name.
 
Method Summary
protected  java.io.File calculateLocalFile()
           
protected  java.lang.String calculateURL()
          Return a URL to the saved file, null if not appropriate.
 
Methods inherited from class org.melati.servlet.BaseFileDataAdaptor
getData, getFile, getSize, getURL, readData
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TemporaryFileDataAdaptor

public TemporaryFileDataAdaptor()
Constructor.


TemporaryFileDataAdaptor

public TemporaryFileDataAdaptor(java.lang.String temporaryFileName)
Constructor specifying temporary file name.

Parameters:
temporaryFileName - the temporary fle name ot use
Method Detail

calculateLocalFile

protected java.io.File calculateLocalFile()
Specified by:
calculateLocalFile in class BaseFileDataAdaptor
Returns:
The file in which to save the data

calculateURL

protected java.lang.String calculateURL()
Description copied from class: BaseFileDataAdaptor
Return a URL to the saved file, null if not appropriate.

Specified by:
calculateURL in class BaseFileDataAdaptor
Returns:
a URL to the saved file, null if not appropriate


Copyright © 2000-2008 PanEris. All Rights Reserved.