Package net.officefloor.server.http.impl
Class MaterialisingHttpRequestHeaders
- java.lang.Object
-
- net.officefloor.server.http.impl.MaterialisingHttpRequestHeaders
-
- All Implemented Interfaces:
java.lang.Iterable<HttpHeader>
,HttpRequestHeaders
public class MaterialisingHttpRequestHeaders extends java.lang.Object implements HttpRequestHeaders
MaterialisingHttpRequestHeaders
.- Author:
- Daniel Sagenschneider
-
-
Constructor Summary
Constructors Constructor Description MaterialisingHttpRequestHeaders(NonMaterialisedHttpHeaders nonMaterialised)
Instantiate.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description HttpHeader
getHeader(java.lang.CharSequence name)
Obtains the firstHttpHeader
by the name.java.lang.Iterable<HttpHeader>
getHeaders(java.lang.CharSequence name)
Obtains all theHttpHeader
instances by the name.HttpHeader
headerAt(int index)
Obtains theHttpHeader
at the index.static boolean
httpEqualsIgnoreCase(java.lang.CharSequence one, java.lang.CharSequence two)
Determines if the twoCharSequence
instances are equal ignoring case.java.util.Iterator<HttpHeader>
iterator()
int
length()
Obtains the number ofHttpHeader
instances.
-
-
-
Constructor Detail
-
MaterialisingHttpRequestHeaders
public MaterialisingHttpRequestHeaders(NonMaterialisedHttpHeaders nonMaterialised)
Instantiate.- Parameters:
nonMaterialised
-NonMaterialisedHttpHeaders
.
-
-
Method Detail
-
httpEqualsIgnoreCase
public static boolean httpEqualsIgnoreCase(java.lang.CharSequence one, java.lang.CharSequence two)
Determines if the twoCharSequence
instances are equal ignoring case.- Parameters:
one
-CharSequence
one.two
-CharSequence
two.- Returns:
true
if theCharSequence
instances are equal ignoring case.
-
iterator
public java.util.Iterator<HttpHeader> iterator()
- Specified by:
iterator
in interfacejava.lang.Iterable<HttpHeader>
-
getHeader
public HttpHeader getHeader(java.lang.CharSequence name)
Description copied from interface:HttpRequestHeaders
Obtains the firstHttpHeader
by the name.- Specified by:
getHeader
in interfaceHttpRequestHeaders
- Parameters:
name
- Name of theHttpHeader
.- Returns:
- First
HttpHeader
ornull
if noHttpHeader
by the name.
-
getHeaders
public java.lang.Iterable<HttpHeader> getHeaders(java.lang.CharSequence name)
Description copied from interface:HttpRequestHeaders
Obtains all theHttpHeader
instances by the name.- Specified by:
getHeaders
in interfaceHttpRequestHeaders
- Parameters:
name
- Name of theHttpHeader
instances.- Returns:
- All
HttpHeader
instances by the name.
-
headerAt
public HttpHeader headerAt(int index)
Description copied from interface:HttpRequestHeaders
Obtains theHttpHeader
at the index.- Specified by:
headerAt
in interfaceHttpRequestHeaders
- Parameters:
index
- Index of theHttpHeader
.- Returns:
HttpHeader
at the index.
-
length
public int length()
Description copied from interface:HttpRequestHeaders
Obtains the number ofHttpHeader
instances.- Specified by:
length
in interfaceHttpRequestHeaders
- Returns:
- Number of
HttpHeader
instances.
-
-