- java.lang.Object
-
- io.helidon.media.multipart.ContentDisposition
-
public final class ContentDisposition extends Object
A generic representation of theContent-Dispositionheader.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 classContentDisposition.BuilderBuilder class to createContentDispositioninstances.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ContentDisposition.Builderbuilder()Create a new builder instance.Optional<ZonedDateTime>creationDate()Get the value of thecreation-dateparameter that can be used to indicate the date at which the file was created.Optional<String>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.Optional<ZonedDateTime>modificationDate()Get the value of themodification-dateparameter that can be used to indicate the date at which the file was last modified.Optional<String>name()Get the value of thenameparameter.Map<String,String>parameters()Get the parameters map.Optional<ZonedDateTime>readDate()Get the value of themodification-dateparameter that can be used to indicate the date at which the file was last read.OptionalLongsize()Get the value of thesizeparameter that can be used to indicate an approximate size of the file in octets.StringtoString()Convert the content disposition to a string suitable for use as the value of a corresponding HTTP header.Stringtype()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 thenameparameter. In the case of aform-datadisposition type the value is the original field name from the form.- Returns:
Optional<String>, nevernull
-
filename
public Optional<String> 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
public Optional<ZonedDateTime> 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
public Optional<ZonedDateTime> 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
public Optional<ZonedDateTime> 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
public OptionalLong size()
Get the value of thesizeparameter 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
-
-