Class Headers
- java.lang.Object
-
- com.ibm.security.access.httpclient.Headers
-
public class Headers extends java.lang.Object
This class stores the headers for a HTTP request.
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
Headers_java_copyright
static java.lang.String
Headers_java_sourceCodeID
-
Constructor Summary
Constructors Constructor Description Headers()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
addHeader(java.lang.String name, java.lang.String value)
Add a headerboolean
addHeader(java.lang.String name, java.util.List values)
Add a headerjava.lang.String[]
getHeader(java.lang.String name)
Get the header values with the specified name.java.lang.String[]
getHeaderNames()
Get all the header names.java.util.Map
getHeaders()
Get all the headers
-
-
-
Field Detail
-
Headers_java_sourceCodeID
public static final java.lang.String Headers_java_sourceCodeID
- See Also:
- Constant Field Values
-
Headers_java_copyright
public static final java.lang.String Headers_java_copyright
-
-
Method Detail
-
addHeader
public boolean addHeader(java.lang.String name, java.util.List values)
Add a header- Parameters:
name
- Header namevalues
- A List(String) of header values- Returns:
- True if successful. False otherwise.
-
addHeader
public boolean addHeader(java.lang.String name, java.lang.String value)
Add a header- Parameters:
name
- Header namevalue
- Header value- Returns:
- True if successful. False otherwise.
-
getHeaderNames
public java.lang.String[] getHeaderNames()
Get all the header names. Returns null if there are no headers.- Returns:
- Header names. Null if no headers.
-
getHeaders
public java.util.Map getHeaders()
Get all the headers- Returns:
- A Map(String,List(String)) of all headers
-
getHeader
public java.lang.String[] getHeader(java.lang.String name)
Get the header values with the specified name. Returns null if no such header name or name was null/empty string.- Parameters:
name
- The header name- Returns:
- A List(String) of values associated with that header name. Null if no such header name exists or name was null/empty string.
-
-