|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.gargoylesoftware.htmlunit.util.NameValuePair
com.gargoylesoftware.htmlunit.util.KeyDataPair
public class KeyDataPair
A holder for a key/value pair that represents a file to upload.
| Constructor Summary | |
|---|---|
KeyDataPair(String key,
File file,
String contentType,
String charset)
Creates an instance. |
|
| Method Summary | |
|---|---|
String |
getCharset()
Gets the charset encoding for this file upload. |
String |
getContentType()
Gets the content type for this file upload. |
byte[] |
getData()
Gets in-memory data assigned to file value. |
File |
getFile()
|
void |
setData(byte[] data)
Sets file value data. |
| Methods inherited from class com.gargoylesoftware.htmlunit.util.NameValuePair |
|---|
equals, getName, getValue, hashCode, toHttpClient, toHttpClient, toString |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public KeyDataPair(String key,
File file,
String contentType,
String charset)
key - the keyfile - the filecontentType - the content typecharset - the charset encoding| Method Detail |
|---|
public File getFile()
File object if the file exists, else nullpublic String getCharset()
public String getContentType()
public byte[] getData()
null if the file content should be used.public void setData(byte[] data)
data - byte array with file data.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||