org.melati.servlet
Class TemporaryFileFormDataAdaptor

Package class diagram package TemporaryFileFormDataAdaptor
java.lang.Object
  extended by org.melati.servlet.BaseFileFormDataAdaptor
      extended by org.melati.servlet.TemporaryFileFormDataAdaptor
All Implemented Interfaces:
FormDataAdaptor

public class TemporaryFileFormDataAdaptor
extends BaseFileFormDataAdaptor

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


Field Summary
 
Fields inherited from class org.melati.servlet.BaseFileFormDataAdaptor
BUFSIZE, field, file, url
 
Constructor Summary
TemporaryFileFormDataAdaptor()
          Constructor using default file name.
TemporaryFileFormDataAdaptor(String temporaryFileName)
          Constructor specifying temporary file name.
 
Method Summary
protected  File calculateLocalFile()
           
protected  String calculateURL()
          Return a URL to the saved file, null if not appropriate.
 
Methods inherited from class org.melati.servlet.BaseFileFormDataAdaptor
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

TemporaryFileFormDataAdaptor

public TemporaryFileFormDataAdaptor()
Constructor using default file name.


TemporaryFileFormDataAdaptor

public TemporaryFileFormDataAdaptor(String temporaryFileName)
Constructor specifying temporary file name.

Parameters:
temporaryFileName - the temporary file name to use
Method Detail

calculateLocalFile

protected File calculateLocalFile()
Specified by:
calculateLocalFile in class BaseFileFormDataAdaptor
Returns:
The file in which to save the data

calculateURL

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

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


Copyright © 2000-2010 PanEris. All Rights Reserved.