java.lang.Object
io.helidon.http.ContentDisposition
A generic representation of the
Content-Disposition header.
Parameter encoding is not supported, other than
URI percent
encoding in the filename parameter. See URLDecoder.
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionAll values of this header.<N> io.helidon.common.mapper.Value<N> as(io.helidon.common.GenericType<N> type) <N> io.helidon.common.mapper.Value<N> <N> io.helidon.common.mapper.Value<N> io.helidon.common.mapper.Value<Boolean> io.helidon.common.mapper.Value<Double> asDouble()io.helidon.common.mapper.Value<Integer> asInt()io.helidon.common.mapper.Value<Long> asLong()io.helidon.common.mapper.Value<String> asString()static ContentDisposition.Builderbuilder()A new builder to set up content disposition.booleanchanging()Changing headers should not be cached, and their value should not be indexed (HTTP/2).Get the value of thenameparameter.Get the value of thecreation-dateparameter that can be used to indicate the date at which the file was created.static ContentDispositionempty()An empty content disposition.filename()Get the value of thefilenameparameter that can be used to suggest a filename to be used if the entity is detached and stored in a separate file.get()Header name for the header.Get the value of themodification-dateparameter that can be used to indicate the date at which the file was last modified.name()Name of the header as configured by user or as received on the wire.Get the parameters map.static ContentDispositionParse a received header value.readDate()Get the value of themodification-dateparameter that can be used to indicate the date at which the file was last read.booleanSensitive headers should not be logged, or indexed (HTTP/2).size()Get the value of thesizeparameter that can be used to indicate an approximate size of the file in octets.toString()type()Content disposition type.intNumber of values this header has.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface io.helidon.http.Header
allValues, validate, value, valueBytes, values, writeHttp1HeaderMethods inherited from interface io.helidon.common.mapper.Value
filter, flatMap, get, get, getBoolean, getDouble, getInt, getLong, getString, stream
-
Method Details
-
builder
A new builder to set up content disposition.- Returns:
- builder
-
parse
Parse a received header value.- Parameters:
headerValue- content disposition header value- Returns:
- a parsed content disposition
-
empty
An empty content disposition.- Returns:
- empty disposition with empty type
-
name
Description copied from interface:HeaderName of the header as configured by user or as received on the wire. -
headerName
Description copied from interface:HeaderHeader name for the header.- Specified by:
headerNamein interfaceHeader- Returns:
- header name
-
get
- Specified by:
getin interfaceio.helidon.common.mapper.Value<String>
-
as
public <N> io.helidon.common.mapper.Value<N> as(Class<N> type) throws io.helidon.common.mapper.MapperException - Specified by:
asin interfaceio.helidon.common.mapper.Value<String>- Throws:
io.helidon.common.mapper.MapperException
-
as
public <N> io.helidon.common.mapper.Value<N> as(io.helidon.common.GenericType<N> type) throws io.helidon.common.mapper.MapperException - Specified by:
asin interfaceio.helidon.common.mapper.Value<String>- Throws:
io.helidon.common.mapper.MapperException
-
as
- Specified by:
asin interfaceio.helidon.common.mapper.Value<String>
-
asOptional
- Specified by:
asOptionalin interfaceio.helidon.common.mapper.Value<String>- Throws:
io.helidon.common.mapper.MapperException
-
asBoolean
- Specified by:
asBooleanin interfaceio.helidon.common.mapper.Value<String>
-
asString
- Specified by:
asStringin interfaceio.helidon.common.mapper.Value<String>
-
asInt
- Specified by:
asIntin interfaceio.helidon.common.mapper.Value<String>
-
asLong
- Specified by:
asLongin interfaceio.helidon.common.mapper.Value<String>
-
asDouble
- Specified by:
asDoublein interfaceio.helidon.common.mapper.Value<String>
-
allValues
Description copied from interface:HeaderAll values of this header. -
valueCount
public int valueCount()Description copied from interface:HeaderNumber of values this header has.- Specified by:
valueCountin interfaceHeader- Returns:
- number of values (minimal number is 1)
-
sensitive
public boolean sensitive()Description copied from interface:HeaderSensitive headers should not be logged, or indexed (HTTP/2). -
changing
public boolean changing()Description copied from interface:HeaderChanging headers should not be cached, and their value should not be indexed (HTTP/2). -
toString
-
contentName
Get the value of thenameparameter. In the case of aform-datadisposition type the value is the original field name from the form.- Returns:
Optional<String>, nevernull
-
filename
Get the value of thefilenameparameter that can be used to suggest a filename to be used if the entity is detached and stored in a separate file.- Returns:
Optional<String>, nevernull
-
creationDate
Get the value of thecreation-dateparameter that can be used to indicate the date at which the file was created.- Returns:
Optional<ZonedDateTime>, nevernull
-
modificationDate
Get the value of themodification-dateparameter that can be used to indicate the date at which the file was last modified.- Returns:
Optional<ZonedDateTime>, nevernull
-
readDate
Get the value of themodification-dateparameter that can be used to indicate the date at which the file was last read.- Returns:
Optional<ZonedDateTime>, nevernull
-
size
Get the value of thesizeparameter that can be used to indicate an approximate size of the file in octets.- Returns:
OptionalLong, nevernull
-
parameters
Get the parameters map.- Returns:
- map, never
null
-
type
Content disposition type.- Returns:
- type of this content disposition
-