com.gargoylesoftware.htmlunit
Class KeyDataPair
java.lang.Object
org.apache.commons.httpclient.NameValuePair
com.gargoylesoftware.htmlunit.KeyValuePair
com.gargoylesoftware.htmlunit.KeyDataPair
- All Implemented Interfaces:
- Serializable
public class KeyDataPair
- extends KeyValuePair
A holder for a key/value pair that represents a file to upload.
- Version:
- $Revision: 2132 $
- Author:
- Brad Clarke, David D. Kilzer, Mike Bowler
- See Also:
- Serialized Form
KeyDataPair
public KeyDataPair(String key,
File file,
String contentType,
String charset)
- Create an instance.
- Parameters:
key
- The key.file
- The file.contentType
- the content typecharset
- the charset encoding
getFile
public File getFile()
- Returns:
- The
java.io.File
object if the file exists, else null
.
getCharset
public String getCharset()
- Gets the charset encoding for this file upload
- Returns:
- the charset
getContentType
public String getContentType()
- Gets the content type for this file upload
- Returns:
- the content type
Copyright © 2002-2010 Gargoyle Software Inc.. All Rights Reserved.