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
-
Method Summary
Modifier and TypeMethodDescriptionAll values of this header.<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 thisValue
to 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.static ContentDisposition.Builder
builder()
A new builder to set up content disposition.boolean
changing()
Changing headers should not be cached, and their value should not be indexed (HTTP/2).Get the value of thename
parameter.Get the value of thecreation-date
parameter that can be used to indicate the date at which the file was created.static ContentDisposition
empty()
An empty content disposition.filename()
Get the value of thefilename
parameter that can be used to suggest a filename to be used if the entity is detached and stored in a separate file.get()
Typed value.Header name for the header.Get the value of themodification-date
parameter 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 ContentDisposition
Parse a received header value.readDate()
Get the value of themodification-date
parameter that can be used to indicate the date at which the file was last read.boolean
Sensitive headers should not be logged, or indexed (HTTP/2).size()
Get the value of thesize
parameter that can be used to indicate an approximate size of the file in octets.toString()
type()
Content disposition type.int
Number of values this header has.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface io.helidon.http.Header
allValues, validate, value, valueBytes, values, writeHttp1Header
-
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:Header
Name of the header as configured by user or as received on the wire. -
headerName
Description copied from interface:Header
Header name for the header.- Specified by:
headerName
in interfaceHeader
- Returns:
- header name
-
get
Description copied from interface:Value
Typed value. -
as
Description copied from interface:Value
Convert this value to a different type using a mapper.- Specified by:
as
in interfaceValue<String>
- Type Parameters:
N
- type we expect- Parameters:
type
- type to convert to- Returns:
- converted value
- Throws:
MapperException
- in case the value cannot be converted
-
as
Description copied from interface:Value
Convert this value to a different type using a mapper.- Specified by:
as
in interfaceValue<String>
- Type Parameters:
N
- type we expect- Parameters:
type
- type to convert to- Returns:
- converted value
- Throws:
MapperException
-
as
Description copied from interface:Value
Convert thisValue
to a different type using a mapper function. -
asOptional
Description copied from interface:Value
Typed value asOptional
. Returns aempty
if this value does not have a backing value present. As this class implements all methods ofOptional
, this is only a utility method if an actualOptional
instance is needed (Optional
itself is {code final}).- Specified by:
asOptional
in interfaceValue<String>
- Returns:
- value as
Optional
,empty
in case the value does not have a direct value - Throws:
MapperException
- in case the value cannot be converted to the expected type- See Also:
-
asBoolean
Description copied from interface:Value
Boolean typed value. -
asString
Description copied from interface:Value
String typed value. -
asInt
Description copied from interface:Value
Integer typed value. -
asLong
Description copied from interface:Value
Long typed value. -
asDouble
Description copied from interface:Value
Double typed value. -
allValues
Description copied from interface:Header
All values of this header. -
valueCount
public int valueCount()Description copied from interface:Header
Number of values this header has.- Specified by:
valueCount
in interfaceHeader
- Returns:
- number of values (minimal number is 1)
-
sensitive
public boolean sensitive()Description copied from interface:Header
Sensitive headers should not be logged, or indexed (HTTP/2). -
changing
public boolean changing()Description copied from interface:Header
Changing headers should not be cached, and their value should not be indexed (HTTP/2). -
toString
-
contentName
Get the value of thename
parameter. In the case of aform-data
disposition type the value is the original field name from the form.- Returns:
Optional<String>
, nevernull
-
filename
Get the value of thefilename
parameter 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-date
parameter that can be used to indicate the date at which the file was created.- Returns:
Optional<ZonedDateTime>
, nevernull
-
modificationDate
Get the value of themodification-date
parameter 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-date
parameter that can be used to indicate the date at which the file was last read.- Returns:
Optional<ZonedDateTime>
, nevernull
-
size
Get the value of thesize
parameter 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
-