Android APIs
Added in API level 1
Deprecated since API level 22
public interface

HttpParams

org.apache.http.params.HttpParams

This interface was deprecated in API level 22.
Please use openConnection() instead. Please visit this webpage for further details.

Class Overview

Represents a collection of HTTP protocol and framework parameters.

Summary

Public Methods
abstract HttpParams copy()
Creates a copy of these parameters.
abstract boolean getBooleanParameter(String name, boolean defaultValue)
Returns a Boolean parameter value with the given name.
abstract double getDoubleParameter(String name, double defaultValue)
Returns a Double parameter value with the given name.
abstract int getIntParameter(String name, int defaultValue)
Returns an Integer parameter value with the given name.
abstract long getLongParameter(String name, long defaultValue)
Returns a Long parameter value with the given name.
abstract Object getParameter(String name)
Obtains the value of the given parameter.
abstract boolean isParameterFalse(String name)
Checks if a boolean parameter is not set or false.
abstract boolean isParameterTrue(String name)
Checks if a boolean parameter is set to true.
abstract boolean removeParameter(String name)
Removes the parameter with the specified name.
abstract HttpParams setBooleanParameter(String name, boolean value)
Assigns a Boolean to the parameter with the given name
abstract HttpParams setDoubleParameter(String name, double value)
Assigns a Double to the parameter with the given name
abstract HttpParams setIntParameter(String name, int value)
Assigns an Integer to the parameter with the given name
abstract HttpParams setLongParameter(String name, long value)
Assigns a Long to the parameter with the given name
abstract HttpParams setParameter(String name, Object value)
Assigns the value to the parameter with the given name.

Public Methods

public abstract HttpParams copy ()

Added in API level 1

Creates a copy of these parameters.

Returns
  • a new set of parameters holding the same values as this one

public abstract boolean getBooleanParameter (String name, boolean defaultValue)

Added in API level 1

Returns a Boolean parameter value with the given name. If the parameter is not explicitly set, the default value is returned.

Parameters
name the parent name.
defaultValue the default value.
Returns
  • a Boolean that represents the value of the parameter.

public abstract double getDoubleParameter (String name, double defaultValue)

Added in API level 1

Returns a Double parameter value with the given name. If the parameter is not explicitly set, the default value is returned.

Parameters
name the parent name.
defaultValue the default value.
Returns
  • a Double that represents the value of the parameter.

public abstract int getIntParameter (String name, int defaultValue)

Added in API level 1

Returns an Integer parameter value with the given name. If the parameter is not explicitly set, the default value is returned.

Parameters
name the parent name.
defaultValue the default value.
Returns
  • a Integer that represents the value of the parameter.

public abstract long getLongParameter (String name, long defaultValue)

Added in API level 1

Returns a Long parameter value with the given name. If the parameter is not explicitly set, the default value is returned.

Parameters
name the parent name.
defaultValue the default value.
Returns
  • a Long that represents the value of the parameter.

public abstract Object getParameter (String name)

Added in API level 1

Obtains the value of the given parameter.

Parameters
name the parent name.
Returns
  • an object that represents the value of the parameter, null if the parameter is not set or if it is explicitly set to null

public abstract boolean isParameterFalse (String name)

Added in API level 1

Checks if a boolean parameter is not set or false.

Parameters
name parameter name
Returns
  • true if the parameter is either not set or set to value false, false if it is set to true

public abstract boolean isParameterTrue (String name)

Added in API level 1

Checks if a boolean parameter is set to true.

Parameters
name parameter name
Returns
  • true if the parameter is set to value true, false if it is not set or set to false

public abstract boolean removeParameter (String name)

Added in API level 1

Removes the parameter with the specified name.

Parameters
name parameter name
Returns
  • true if the parameter existed and has been removed, false else.

public abstract HttpParams setBooleanParameter (String name, boolean value)

Added in API level 1

Assigns a Boolean to the parameter with the given name

Parameters
name parameter name
value parameter value

public abstract HttpParams setDoubleParameter (String name, double value)

Added in API level 1

Assigns a Double to the parameter with the given name

Parameters
name parameter name
value parameter value

public abstract HttpParams setIntParameter (String name, int value)

Added in API level 1

Assigns an Integer to the parameter with the given name

Parameters
name parameter name
value parameter value

public abstract HttpParams setLongParameter (String name, long value)

Added in API level 1

Assigns a Long to the parameter with the given name

Parameters
name parameter name
value parameter value

public abstract HttpParams setParameter (String name, Object value)

Added in API level 1

Assigns the value to the parameter with the given name.

Parameters
name parameter name
value parameter value