|
PulpCore | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectpulpcore.net.Upload
public class Upload
The Upload class represents name/value pairs for sending to an HTTP server via the POST method (multipart form). Values can be either plain text or files.
| Constructor Summary | |
|---|---|
Upload(URL url)
Creates a new Upload object. |
|
| Method Summary | |
|---|---|
void |
addField(String name,
String value)
Add a plain text form field to this form. |
void |
addFields(Map fields)
Adds plain text form fields to this form. |
void |
addFile(String name,
String fileName,
String mimeType,
byte[] fileData)
Add a data file to this form. |
String |
getResponse()
|
boolean |
isCompleted()
|
void |
run()
|
void |
sendNow()
Write the form to an URL via the POST method in the current thread. |
void |
start()
Write the form to an URL via the POST method in a new thread. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public Upload(URL url)
url - the URL to send the POST to.| Method Detail |
|---|
public void addFields(Map fields)
public void addField(String name,
String value)
public void addFile(String name,
String fileName,
String mimeType,
byte[] fileData)
public void run()
run in interface Runnablepublic void start()
public void sendNow()
throws IOException
IOExceptionpublic String getResponse()
public boolean isCompleted()
|
PulpCore | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||