public class DefaultHttpHeaderManager extends Object implements HttpHeaderManager
Modifier and Type | Field and Description |
---|---|
protected HashMap<String,DefaultHttpHeader> |
headers
Stores the headers.
|
Constructor and Description |
---|
DefaultHttpHeaderManager()
Constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
addHeader(String name,
String value)
Add the header.
|
boolean |
containsHeader(String name)
Contains the given header.
|
long |
getDateHeader(String name)
Get the date header.
|
String |
getHeader(String name)
Get the header.
|
Enumeration<String> |
getHeaderNames()
Get the header names.
|
Enumeration<String> |
getHeaders(String name)
Get the headers.
|
int |
getIntHeader(String name)
Get the int header.
|
void |
setHeader(String name,
String value)
Set the header.
|
protected final HashMap<String,DefaultHttpHeader> headers
public void addHeader(String name, String value)
addHeader
in interface HttpHeaderManager
name
- the name.value
- the value.public boolean containsHeader(String name)
containsHeader
in interface HttpHeaderManager
name
- the header name.public long getDateHeader(String name) throws IllegalArgumentException
getDateHeader
in interface HttpHeaderManager
name
- the header name.IllegalArgumentException
public String getHeader(String name)
getHeader
in interface HttpHeaderManager
name
- the header name.public Enumeration<String> getHeaderNames()
getHeaderNames
in interface HttpHeaderManager
public Enumeration<String> getHeaders(String name)
getHeaders
in interface HttpHeaderManager
name
- the header name.public int getIntHeader(String name) throws NumberFormatException
getIntHeader
in interface HttpHeaderManager
name
- the header name.NumberFormatException
public void setHeader(String name, String value)
setHeader
in interface HttpHeaderManager
name
- the name.value
- the value (string).Copyright © 2020. All rights reserved.