org.apache.jmeter.protocol.http.util
Class HTTPFileArg
- Cloneable, Serializable, TestElement
public class HTTPFileArg
implements Serializable
Class representing a file parameter for http upload.
Consists of a http parameter name/file path pair with (optional) mimetype.
Also provides temporary storage for the headers which are sent with files.
String | getHeader() - Gets the saved body header for the HTTPFileArg object.
|
String | getMimeType() - Get the mimetype of the File.
|
String | getParamName() - Get the http parameter name of the File.
|
String | getPath() - Get the path of the File.
|
boolean | isNotEmpty() - Check if the entry is not empty.
|
void | setHeader(String newHeader) - Sets the body header for the HTTPFileArg object.
|
void | setMimeType(String newMimeType) - Set the mimetype of the File.
|
void | setParamName(String newParamName) - Set the http parameter name of the File.
|
void | setPath(String newPath) - Set the path of the File.
|
String | toString() - returns path, param name, mime type information of
HTTPFileArg object.
|
addProperty , addTestElement , canRemove , clear , clearTemporary , clone , emptyTemporary , equals , getComment , getName , getProperty , getPropertyAsBoolean , getPropertyAsBoolean , getPropertyAsDouble , getPropertyAsFloat , getPropertyAsInt , getPropertyAsInt , getPropertyAsLong , getPropertyAsString , getPropertyAsString , getThreadContext , getThreadName , hashCode , isEnabled , isRunningVersion , isTemporary , logProperties , mergeIn , propertyIterator , recoverRunningVersion , removeProperty , setComment , setName , setProperty , setProperty , setProperty , setProperty , setProperty , setProperty , setProperty , setRunningVersion , setTemporary , setThreadContext , setThreadName , traverse , traverseCollection , traverseMap , traverseProperty |
HTTPFileArg
public HTTPFileArg()
Constructor for an empty HTTPFileArg object
HTTPFileArg
public HTTPFileArg(String path)
Constructor for the HTTPFileArg object with given path.
HTTPFileArg
public HTTPFileArg(String path,
String paramname,
String mimetype)
Constructor for the HTTPFileArg object with full information.
HTTPFileArg
public HTTPFileArg(HTTPFileArg file)
Copy Constructor.
getHeader
public String getHeader()
Gets the saved body header for the HTTPFileArg object.
getMimeType
public String getMimeType()
Get the mimetype of the File.
- the http parameter mimetype
getParamName
public String getParamName()
Get the http parameter name of the File.
getPath
public String getPath()
Get the path of the File.
isNotEmpty
public boolean isNotEmpty()
Check if the entry is not empty.
- true if Path, name or mimetype fields are not the empty string
setHeader
public void setHeader(String newHeader)
Sets the body header for the HTTPFileArg object. Header
contains path, parameter name and mime type information.
This is only intended for use by methods which need to store information
temporarily whilst creating the HTTP body.
newHeader
- the new Header value
setMimeType
public void setMimeType(String newMimeType)
Set the mimetype of the File.
newMimeType
- the new mimetype
setParamName
public void setParamName(String newParamName)
Set the http parameter name of the File.
newParamName
- the new http parameter name
setPath
public void setPath(String newPath)
Set the path of the File.
toString
public String toString()
returns path, param name, mime type information of
HTTPFileArg object.
- the string demonstration of HTTPFileArg object in this
format:
"path:''|param:''"
Copyright © 1998-2010 Apache Software Foundation. All Rights Reserved.