|
||||||||||
| 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 | |
|---|---|
boolean |
equals(Object object)
|
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()
|
int |
hashCode()
|
void |
setData(byte[] data)
Sets file value data. |
| Methods inherited from class com.gargoylesoftware.htmlunit.util.NameValuePair |
|---|
getName, getValue, 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 boolean equals(Object object)
equals in class NameValuePairpublic int hashCode()
hashCode in class NameValuePairpublic 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 | |||||||||