Interface HeaderWriteable
Mutable header value.
-
Method Summary
Modifier and TypeMethodDescriptionAdd a value to this header.static HeaderWriteableCreate a new mutable header from an existing header.Methods inherited from interface Header
allValues, allValues, changing, headerName, name, sensitive, validate, valueBytes, valueCount, values, writeHttp1HeaderModifier and TypeMethodDescriptionAll values of this header.allValues(boolean split) All values of this header.booleanchanging()Changing headers should not be cached, and their value should not be indexed (HTTP/2).Header name for the header.name()Name of the header as configured by user or as received on the wire.booleanSensitive headers should not be logged, or indexed (HTTP/2).default voidvalidate()Check validity of the header name and values.default byte[]Bytes of a single-valued header value.intNumber of values this header has.default Stringvalues()All values concatenated using a comma and a space.default voidwriteHttp1Header(BufferData buffer) Write the current header as an HTTP header to the provided buffer.Methods inherited from interface Value
as, as, as, asBoolean, asDouble, asInt, asLong, asOptional, asString, filter, flatMap, get, get, get, getBoolean, getDouble, getInt, getLong, getString, streamModifier and TypeMethodDescription<N> Value<N> as(GenericType<N> type) Convert this value to a different type using a mapper.<N> Value<N> Convert this value to a different type using a mapper.<N> Value<N> Convert thisValueto a different type using a mapper function.Boolean typed value.asDouble()Double typed value.asInt()Integer typed value.asLong()Long typed value.Typed value asOptional.asString()String typed value.If a value is present, and the value matches the given predicate, return anOptionaldescribing the value, otherwise return an emptyOptional.default <U> Optional<U> Apply the providedOptional-bearing mapping function to this value, return that result.get()Typed value.default <N> Nget(GenericType<N> type) Convert this value to a different type using a mapper.default <N> NConvert this value to a different type using a mapper.default booleanBoolean typed value.default doubleDouble typed value.default intgetInt()Integer typed value.default longgetLong()Long typed value.default StringString typed value.stream()If a value is present, returns a sequentialStreamcontaining only that value, otherwise returns an emptyStream.
-
Method Details
-
create
Create a new mutable header from an existing header.- Parameters:
header- header to copy- Returns:
- a new mutable header
-
addValue
Add a value to this header.- Parameters:
value- value to add- Returns:
- this instance
-