@Deprecated public class MultipartRequestHandler extends Object
| Constructor and Description |
|---|
MultipartRequestHandler(String url,
String httpMethod)
Deprecated.
constructor
|
MultipartRequestHandler(String url,
String httpMethod,
org.apache.http.client.HttpClient httpClient)
Deprecated.
constructor
|
| Modifier and Type | Method and Description |
|---|---|
void |
addFilePart(String name,
File f)
Deprecated.
add a file part to the MMP
|
void |
addFilePart(String name,
InputStream is)
Deprecated.
add a file part to the MMP, using InputStream
This method writes the contents of the stream to
a temp file and sends it.
|
void |
addFilePart(String name,
String value)
Deprecated.
This method generates a temp files for sending, containing
the value parameter.
|
void |
addParamPart(String name,
String value)
Deprecated.
add a param part to the MMP
|
boolean |
cleanupTempFiles()
Deprecated.
calling this method attempts to delete the client-side
temp files from the system.
|
org.apache.http.HttpResponse |
executeRequest()
Deprecated.
execute the request
|
org.apache.http.client.HttpClient |
getHttpClient()
Deprecated.
|
org.apache.http.client.methods.HttpUriRequest |
getRequest()
Deprecated.
Returns the request for use by any org.apache.http.client.HttpClient
|
void |
setHttpClient(org.apache.http.client.HttpClient httpClient)
Deprecated.
replace the DefaultHttpClient created at time of instantiation
with the specified one.
|
public MultipartRequestHandler(String url, String httpMethod, org.apache.http.client.HttpClient httpClient)
url - public org.apache.http.client.HttpClient getHttpClient()
public void setHttpClient(org.apache.http.client.HttpClient httpClient)
public void addFilePart(String name, File f)
f - name - public void addFilePart(String name, InputStream is) throws IOException
is - name - IOExceptionpublic void addFilePart(String name, String value) throws IOException
name - value - IOExceptionpublic void addParamPart(String name, String value)
name - value - public org.apache.http.client.methods.HttpUriRequest getRequest()
public org.apache.http.HttpResponse executeRequest()
throws org.apache.http.client.ClientProtocolException,
IOException
org.apache.http.client.ClientProtocolExceptionIOExceptionpublic boolean cleanupTempFiles()
Copyright © 2014. All Rights Reserved.