com.gargoylesoftware.htmlunit
Class KeyDataPair

java.lang.Object
  extended by org.apache.commons.httpclient.NameValuePair
      extended by com.gargoylesoftware.htmlunit.KeyValuePair
          extended by 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

Constructor Summary
KeyDataPair(String key, File file, String contentType, String charset)
          Create an instance.
 
Method Summary
 String getCharset()
          Gets the charset encoding for this file upload
 String getContentType()
          Gets the content type for this file upload
 File getFile()
           
 
Methods inherited from class com.gargoylesoftware.htmlunit.KeyValuePair
getKey, toString
 
Methods inherited from class org.apache.commons.httpclient.NameValuePair
equals, getName, getValue, hashCode, setName, setValue
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

KeyDataPair

public KeyDataPair(String key,
                   File file,
                   String contentType,
                   String charset)
Create an instance.

Parameters:
key - The key.
file - The file.
contentType - the content type
charset - the charset encoding
Method Detail

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.