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:
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 com.gargoylesoftware.htmlunit.KeyValuePair
getKey, getValue, toString
 
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
 

Constructor Detail

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 type
charset - the charset encoding
Method Detail

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-2016 AppPerfect Corporation. All Rights Reserved.