|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.directwebremoting.io.FileTransfer
public class FileTransfer
One of the 2 ways you can receive uploaded files from a DWR enabled page is
to expose a method with a FileTransfer parameter.
The other is to expose a method with an InputStream parameter.
| Constructor Summary | |
|---|---|
FileTransfer(java.awt.image.BufferedImage image,
java.lang.String type)
A ctor for the 3 things browsers tell us about the uploaded file |
|
FileTransfer(java.awt.image.BufferedImage image,
java.lang.String filename,
java.lang.String type)
A ctor for the 3 things browsers tell us about the uploaded file |
|
FileTransfer(java.lang.String filename,
java.lang.String mimeType,
byte[] bytes)
A ctor for the 3 things browsers tell us about the uploaded file |
|
FileTransfer(java.lang.String filename,
java.lang.String mimeType,
java.io.InputStream in)
A ctor for the 3 things browsers tell us about the uploaded file |
|
FileTransfer(java.lang.String filename,
java.lang.String mimeType,
InputStreamFactory inputStreamFactory)
A ctor for the 3 things browsers tell us about the uploaded file |
|
FileTransfer(java.lang.String filename,
java.lang.String mimeType,
long size,
java.io.InputStream in)
A ctor for InputStream + all other details |
|
FileTransfer(java.lang.String filename,
java.lang.String mimeType,
long size,
InputStreamFactory inputStreamFactory)
A ctor for InputStreamFactory + all other details |
|
FileTransfer(java.lang.String filename,
java.lang.String mimeType,
OutputStreamLoader outputStreamLoader)
A ctor for the 3 things browsers tell us about the uploaded file |
|
| Method Summary | |
|---|---|
java.lang.String |
getFilename()
Returns the original filename in the client's file-system, as provided by the browser (or other client software). |
java.io.InputStream |
getInputStream()
Returns an InputStream that can be used to retrieve the contents
of the file. |
java.lang.String |
getMimeType()
Returns the content type passed by the browser or null if not defined. |
OutputStreamLoader |
getOutputStreamLoader()
Returns an OutputStreamLoader that can be used to retrieve the contents of the file. |
long |
getSize()
Returns the size of the file passed by the browser or -1 if this is not known. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public FileTransfer(java.lang.String filename,
java.lang.String mimeType,
OutputStreamLoader outputStreamLoader)
filename - The remote source filenamemimeType - The mime type passed in by the browseroutputStreamLoader - A means by which the data can be read
public FileTransfer(java.awt.image.BufferedImage image,
java.lang.String type)
public FileTransfer(java.awt.image.BufferedImage image,
java.lang.String filename,
java.lang.String type)
public FileTransfer(java.lang.String filename,
java.lang.String mimeType,
byte[] bytes)
filename - The remote source filenamemimeType - The mime type passed in by the browserbytes - the raw data
public FileTransfer(java.lang.String filename,
java.lang.String mimeType,
long size,
InputStreamFactory inputStreamFactory)
filename - The remote source filenamemimeType - The mime type passed in by the browsersize - The size of the fileinputStreamFactory - A means by which the data can be read
public FileTransfer(java.lang.String filename,
java.lang.String mimeType,
long size,
java.io.InputStream in)
filename - The remote source filenamemimeType - The mime type passed in by the browsersize - The size of the filein - A means by which the data can be read.
public FileTransfer(java.lang.String filename,
java.lang.String mimeType,
InputStreamFactory inputStreamFactory)
filename - The remote source filenamemimeType - The mime type passed in by the browserinputStreamFactory - A means by which the data can be read
public FileTransfer(java.lang.String filename,
java.lang.String mimeType,
java.io.InputStream in)
filename - The remote source filenamemimeType - The mime type passed in by the browserin - A means by which the data can be read.| Method Detail |
|---|
public java.lang.String getFilename()
public java.lang.String getMimeType()
public long getSize()
public OutputStreamLoader getOutputStreamLoader()
public java.io.InputStream getInputStream()
throws java.io.IOException
InputStream that can be used to retrieve the contents
of the file.
InputStreamFactory is used place of direct access to an
InputStream to ensure that resources are properly closed.
java.io.IOException
|
Copyright ยจ 2008 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||