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.
| Modifier and Type | Field and Description |
|---|---|
| private static final EnumMap | |
| private final EnumMap | |
| private final long | |
| private static final Logger |
| Access | Constructor and Description |
|---|---|
| private | |
| public | |
| public | |
| public | |
| public | |
| public |
| Modifier and Type | Method and Description |
|---|---|
| public boolean | contains(String
the string to search for search)Overrides org. Returns whether this field value, possibly multi-valued, contains the specified search string, case-insensitively. |
| public int | |
| public int | |
| public long | |
| public void |
| __encoders | back to summary |
|---|---|
| private static final EnumMap<HttpVersion, HttpFieldPreEncoder> __encoders | |
| _encodedFields | back to summary |
|---|---|
| private final EnumMap<HttpVersion, byte[]> _encodedFields | |
| _longValue | back to summary |
|---|---|
| private final long _longValue | |
| LOG | back to summary |
|---|---|
| private static final Logger LOG | |
| PreEncodedHttpField | back to summary |
|---|---|
| private PreEncodedHttpField(HttpHeader header, String name, String value, long longValue) | |
| PreEncodedHttpField | back to summary |
|---|---|
| public PreEncodedHttpField(HttpHeader header, String name, String value) | |
| PreEncodedHttpField | back to summary |
|---|---|
| public PreEncodedHttpField(HttpHeader header, String value) | |
| PreEncodedHttpField | back to summary |
|---|---|
| public PreEncodedHttpField(HttpHeader header, long value) | |
| PreEncodedHttpField | back to summary |
|---|---|
| public PreEncodedHttpField(String name, String value) | |
| PreEncodedHttpField | back to summary |
|---|---|
| public PreEncodedHttpField(String name, long value) | |
| contains | back to summary |
|---|---|
| public boolean contains(String search) Overrides org. Doc from org. Returns 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. | |
| getEncodedLength | back to summary |
|---|---|
| public int getEncodedLength(HttpVersion version) | |
| getIntValue | back to summary |
|---|---|
| public int getIntValue() Overrides org.
| |
| getLongValue | back to summary |
|---|---|
| public long getLongValue() Overrides org.
| |
| putTo | back to summary |
|---|---|
| public void putTo(ByteBuffer bufferInFillMode, HttpVersion version) | |