java.lang.Object
org.enhydra.httpServerTest.server.common.FileUploadMangler
- All Implemented Interfaces:
- HTTPClient.FilenameMangler
- public class FileUploadMangler
- extends java.lang.Object
- implements HTTPClient.FilenameMangler
This file implements the FilenameMangler to ensure that files uploaded
to the server are save with unique file names on the file system.
|
Field Summary |
static java.lang.Long |
fileNameCnt
A static counter variable that increments for every time the
mangleFilename is called. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
fileNameCnt
public static java.lang.Long fileNameCnt
- A static counter variable that increments for every time the
mangleFilename is called. This object is synchronized on for
thread safty.
FileUploadMangler
public FileUploadMangler()
mangleFilename
public java.lang.String mangleFilename(java.lang.String filename,
java.lang.String fieldname)
- This function is automatically invoked by the Codecs class when
parsing multi-part mime encodings. This function will produce a
unique extension to the supplied file name.
- Specified by:
mangleFilename in interface HTTPClient.FilenameMangler