public static interface HTTPRequest.DataProvider
HTTPRequest. The
connected server will receive it as a file upload.
sendFile(OutputStream) will deliver the data. It is invoked just that
moment the data is required. The HTTPRequest does not store the data
itself, so this mechanism also allows to send huge files with a small memory print.
| Modifier and Type | Method and Description |
|---|---|
String |
getFileName()
Returns the file name of the file.
|
String |
getMimeType()
Returns the MimeType of the file.
|
void |
sendFile(OutputStream out)
Commands this FileProvider to send its data to the given
OutputStream. |
String getMimeType()
String getFileName()
void sendFile(OutputStream out) throws IOException
OutputStream.
IMPORTANT: you must not flush or close the stream!
out - OutputStreamIOException - if transmission failedCopyright © 2004–2016. All rights reserved.