com.gargoylesoftware.htmlunit.util
Class KeyDataPair

java.lang.Object
  extended by com.gargoylesoftware.htmlunit.util.NameValuePair
      extended by com.gargoylesoftware.htmlunit.util.KeyDataPair
All Implemented Interfaces:
Serializable

Deprecated. as of 2.13, with no replacement

@Deprecated
public class KeyDataPair
extends NameValuePair

A holder for a key/value pair that represents a file to upload.

Version:
$Revision: 8931 $
Author:
Brad Clarke, David D. Kilzer, Mike Bowler, Ahmed Ashour
See Also:
Serialized Form

Constructor Summary
KeyDataPair(String key, File file, String mimeType, String charset)
          Deprecated. Creates an instance.
 
Method Summary
 boolean equals(Object object)
          Deprecated. 
 String getCharset()
          Deprecated. Gets the charset encoding for this file upload.
 String getContentType()
          Deprecated. as of 2.13, please use getMimeType()
 byte[] getData()
          Deprecated. Gets in-memory data assigned to file value.
 File getFile()
          Deprecated.  
 String getMimeType()
          Deprecated. Gets the MIME type for this file upload.
 int hashCode()
          Deprecated. 
 void setData(byte[] data)
          Deprecated. 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

KeyDataPair

public KeyDataPair(String key,
                   File file,
                   String mimeType,
                   String charset)
Deprecated. 
Creates an instance.

Parameters:
key - the key
file - the file
mimeType - the MIME type
charset - the charset encoding
Method Detail

equals

public boolean equals(Object object)
Deprecated. 

Overrides:
equals in class NameValuePair

hashCode

public int hashCode()
Deprecated. 

Overrides:
hashCode in class NameValuePair

getFile

public File getFile()
Deprecated. 
Returns:
the File object if the file exists, else null

getCharset

public String getCharset()
Deprecated. 
Gets the charset encoding for this file upload.

Returns:
the charset

getContentType

@Deprecated
public String getContentType()
Deprecated. as of 2.13, please use getMimeType()

Gets the content type for this file upload.

Returns:
the content type

getMimeType

public String getMimeType()
Deprecated. 
Gets the MIME type for this file upload.

Returns:
the MIME type

getData

public byte[] getData()
Deprecated. 
Gets in-memory data assigned to file value.

Returns:
null if the file content should be used.

setData

public void setData(byte[] data)
Deprecated. 
Sets file value data. If nothing is set, the file content will be used.

Parameters:
data - byte array with file data.


Copyright © 2002–2014 Gargoyle Software Inc.. All rights reserved.