java.lang.Object
org.eclipse.jetty.http.HttpField
org.eclipse.jetty.http.PreEncodedHttpField
Pre encoded HttpField.
An HttpField that will be cached and used many times can be created as
a PreEncodedHttpField, which will use the HttpFieldPreEncoder
instances discovered by the ServiceLoader to pre-encode the header
for each version of HTTP in use. This will save garbage
and CPU each time the field is encoded into a response.
-
Nested Class Summary
Nested classes/interfaces inherited from class org.eclipse.jetty.http.HttpField
HttpField.IntValueHttpField, HttpField.LongValueHttpField -
Field Summary
Fields inherited from class org.eclipse.jetty.http.HttpField
NAME_VALUE_TOKENIZER, PARAMETER_TOKENIZER -
Constructor Summary
ConstructorsConstructorDescriptionPreEncodedHttpField(String name, long value) PreEncodedHttpField(String name, String value) PreEncodedHttpField(HttpHeader header, long value) PreEncodedHttpField(HttpHeader header, String value) PreEncodedHttpField(HttpHeader header, String name, String value) -
Method Summary
Modifier and TypeMethodDescriptionbooleanReturns whether this field value, possibly multi-valued, contains the specified search string, case-insensitively.intgetEncodedLength(HttpVersion version) intlongvoidputTo(ByteBuffer bufferInFillMode, HttpVersion version) Methods inherited from class org.eclipse.jetty.http.HttpField
contains, containsLast, containsLast, equals, getHeader, getLowerCaseName, getName, getValue, getValueList, getValueParameters, getValues, hashCode, is, isSameName, stripParameters, toString, valueParameters, withoutValue
-
Constructor Details
-
PreEncodedHttpField
-
PreEncodedHttpField
-
PreEncodedHttpField
-
PreEncodedHttpField
-
PreEncodedHttpField
-
-
Method Details
-
putTo
-
getEncodedLength
-
contains
Description copied from class:HttpFieldReturns whether this field value, possibly multi-valued, contains the specified search string, case-insensitively.
Only values, and not parameters, are compared with the search string.
-
getIntValue
public int getIntValue()- Overrides:
getIntValuein classHttpField- Returns:
- the value of this field as an
int
-
getLongValue
public long getLongValue()- Overrides:
getLongValuein classHttpField- Returns:
- the value of this field as an
long
-