- java.lang.Object
-
- io.helidon.media.multipart.ContentDisposition
-
public final class ContentDisposition extends Object
A generic representation of theContent-Disposition
header.Parameter encoding is not supported, other than URI percent encoding in the filename parameter. See
See also:URLDecoder
.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
ContentDisposition.Builder
Builder class to createContentDisposition
instances.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ContentDisposition.Builder
builder()
Create a new builder instance.Optional<ZonedDateTime>
creationDate()
Get the value of thecreation-date
parameter that can be used to indicate the date at which the file was created.Optional<String>
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.Optional<ZonedDateTime>
modificationDate()
Get the value of themodification-date
parameter that can be used to indicate the date at which the file was last modified.Optional<String>
name()
Get the value of thename
parameter.Map<String,String>
parameters()
Get the parameters map.Optional<ZonedDateTime>
readDate()
Get the value of themodification-date
parameter that can be used to indicate the date at which the file was last read.OptionalLong
size()
Get the value of thesize
parameter that can be used to indicate an approximate size of the file in octets.String
toString()
Convert the content disposition to a string suitable for use as the value of a corresponding HTTP header.String
type()
The content disposition type.
-
-
-
Method Detail
-
type
public String type()
The content disposition type.- Returns:
- type, never
null
-
name
public Optional<String> name()
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
public Optional<String> 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
public Optional<ZonedDateTime> 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
public Optional<ZonedDateTime> 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
public Optional<ZonedDateTime> 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
public OptionalLong size()
Get the value of thesize
parameter that can be used to indicate an approximate size of the file in octets.- Returns:
OptionalLong
, nevernull
-
toString
public String toString()
Convert the content disposition to a string suitable for use as the value of a corresponding HTTP header.
-
builder
public static ContentDisposition.Builder builder()
Create a new builder instance.- Returns:
- Builder
-
-