Package com.linecorp.armeria.common
Class ContentDisposition
java.lang.Object
com.linecorp.armeria.common.ContentDisposition
Representation of the Content-Disposition type and parameters as defined in RFC 6266.
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionReturns the header value for this content disposition as defined in RFC 6266.static ContentDispositionBuilder
Returns a newContentDispositionBuilder
with the specifiedtype
.charset()
Returns the charset defined infilename*
parameter, ornull
if not defined.boolean
filename()
Returns the value of thefilename
parameter (or the value of thefilename*
one decoded as defined in the RFC 5987), ornull
if not defined.int
hashCode()
name()
Returns the value of thename
parameter, ornull
if not defined.static ContentDisposition
of()
Returns an emptyContentDisposition
.static ContentDisposition
Returns a newContentDisposition
with the specifiedtype
.static ContentDisposition
static ContentDisposition
static ContentDisposition
Parses a"content-disposition"
header value as defined in RFC 2183.toString()
Returns the header value for this content disposition as defined in RFC 6266.type()
Returns the disposition type, like for exampleinline
,attachment
,form-data
.
-
Method Details
-
builder
Returns a newContentDispositionBuilder
with the specifiedtype
.- Parameters:
type
- the disposition type like for exampleinline
,attachment
, orform-data
-
of
Returns a newContentDisposition
with the specifiedtype
.- Parameters:
type
- the disposition type like for exampleinline
,attachment
, orform-data
-
of
- Parameters:
type
- the disposition type like for exampleinline
,attachment
, orform-data
name
- the name parameter
-
of
- Parameters:
type
- the disposition type like for exampleinline
,attachment
, orform-data
name
- the name parameterfilename
- the filename parameter that will be formatted as quoted-string, as defined in RFC 2616, section 2.2, and any quote characters within the filename value will be escaped with a backslash, e.g."foo\"bar.txt"
becomes"foo\\\"bar.txt"
-
of
Returns an emptyContentDisposition
. -
parse
Parses a"content-disposition"
header value as defined in RFC 2183.Note that only the US-ASCII, UTF-8 and ISO-8859-1 charsets are supported. If other charsets are specified, ISO-8859-1 will be used instead.
- Parameters:
contentDisposition
- the"content-disposition"
header value- Returns:
- the parsed content disposition
- See Also:
-
type
Returns the disposition type, like for exampleinline
,attachment
,form-data
. -
name
Returns the value of thename
parameter, ornull
if not defined. -
filename
Returns the value of thefilename
parameter (or the value of thefilename*
one decoded as defined in the RFC 5987), ornull
if not defined. -
charset
Returns the charset defined infilename*
parameter, ornull
if not defined. -
equals
-
hashCode
public int hashCode() -
asHeaderValue
Returns the header value for this content disposition as defined in RFC 6266.- See Also:
-
toString
Returns the header value for this content disposition as defined in RFC 6266.
-