public static class HTTPRequest.FileProvider extends HTTPRequest.InputStreamProvider
HTTPRequest.DataProvider implementation uploads a File to the server.| Modifier and Type | Field and Description |
|---|---|
protected File |
file |
protected String |
mimetype |
in| Constructor and Description |
|---|
FileProvider(File file)
Creates a new FileProvider with an "application/octet-stream" mime type.
|
FileProvider(File file,
String mimetype)
Creates a new FileProvider with the given mime type.
|
| Modifier and Type | Method and Description |
|---|---|
String |
getFileName()
Returns the file name of the file.
|
String |
getMimeType()
Returns the MimeType of the file.
|
sendFilepublic FileProvider(File file) throws FileNotFoundException
file - File to be sentFileNotFoundExceptionpublic FileProvider(File file, String mimetype) throws FileNotFoundException
file - File to be sentmimetype - Mime type of that fileFileNotFoundExceptionpublic String getMimeType()
public String getFileName()
Copyright © 2004–2016. All rights reserved.