|
SPT Core API | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.sptci.echo2.FileUploadListener<S>
public class FileUploadListener<S>
A file upload listener for reading and storing files uploaded from the client browser.
Copyright 2006 Sans Pareil Technologies, Inc.
| Constructor Summary | |
|---|---|
FileUploadListener(S source,
String callback)
Create a new instance of the listener, which will save the contents of the uploaded read to an file named after the original uploaded file and to the system java.io.tmpdir. |
|
FileUploadListener(String path,
S source,
String callback)
Create a new instance of the listener, which will save the contents of the uploaded file to an file named after the original uploaded file and to the specified path. |
|
| Method Summary | |
|---|---|
void |
fileUpload(nextapp.echo2.app.filetransfer.UploadEvent event)
Implementation of the method that handles file upload events. |
String |
getContentType()
Returns contentType. |
String |
getFileName()
Returns fileName. |
int |
getSize()
Returns size. |
void |
invalidFileUpload(nextapp.echo2.app.filetransfer.UploadEvent event)
The implementation of the method that handles invalid upload requests. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public FileUploadListener(S source,
String callback)
java.io.tmpdir. After the
file upload the specified callback method will be
invoked on the source object.
source - The source object on which the callback method
should be invoked.callback - The name of the callback method to invoke.
This method must take a File as its sole
parameter.
public FileUploadListener(String path,
S source,
String callback)
callback method will be
invoked on the source object.
path - The path value to use to store the file.source - The source object on which the callback method
should be invoked.callback - The name of the callback method to invoke.
This method must take a File as its sole
parameter.| Method Detail |
|---|
public void invalidFileUpload(nextapp.echo2.app.filetransfer.UploadEvent event)
invalidFileUpload in interface nextapp.echo2.app.filetransfer.UploadListenerpublic void fileUpload(nextapp.echo2.app.filetransfer.UploadEvent event)
fileUpload in interface nextapp.echo2.app.filetransfer.UploadListenerevent - The upload event that triggered the upload.initFile(nextapp.echo2.app.filetransfer.UploadEvent),
writeFile(java.io.File, java.io.InputStream)public final String getFileName()
fileName.
public final String getContentType()
contentType.
public final int getSize()
size.
|
SPT Core API | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||