com.gargoylesoftware.htmlunit
Class KeyDataPair
java.lang.Object
org.apache.commons.httpclient.NameValuePair
com.gargoylesoftware.htmlunit.KeyValuePair
com.gargoylesoftware.htmlunit.KeyDataPair
- All Implemented Interfaces:
- java.io.Serializable
public class KeyDataPair
- extends KeyValuePair
A holder for a key/value pair that represents a file to upload.
- Version:
- $Revision: 1.3 $
- Author:
- Brad Clarke, David D. Kilzer, Mike Bowler
- See Also:
- Serialized Form
Constructor Summary |
KeyDataPair(java.lang.String key,
java.io.File file,
java.lang.String contentType,
java.lang.String charset)
Create an instance. |
Method Summary |
java.lang.String |
getCharset()
Gets the charset encoding for this file upload |
java.lang.String |
getContentType()
Gets the content type for this file upload |
java.io.File |
getFile()
|
Methods inherited from class org.apache.commons.httpclient.NameValuePair |
equals, getName, hashCode, setName, setValue |
Methods inherited from class java.lang.Object |
getClass, notify, notifyAll, wait, wait, wait |
KeyDataPair
public KeyDataPair(java.lang.String key,
java.io.File file,
java.lang.String contentType,
java.lang.String charset)
- Create an instance.
- Parameters:
key
- The key.file
- The file.contentType
- the content typecharset
- the charset encoding
getCharset
public java.lang.String getCharset()
- Gets the charset encoding for this file upload
- Returns:
- the charset
getContentType
public java.lang.String getContentType()
- Gets the content type for this file upload
- Returns:
- the content type
getFile
public java.io.File getFile()
- Returns:
- The
java.io.File
object if the file exists, else null
.
Copyright © 2003-2009 AppPerfect Corporation. All Rights Reserved.