Class ContentDisposition

All Implemented Interfaces:
Serializable, Cloneable, Header, NameValuePair

@Header("Content-Disposition") public class ContentDisposition extends BasicStringRangesHeader
Represents a parsed Content-Disposition HTTP request header.

In a regular HTTP response, the Content-Disposition response header is a header indicating if the content is expected to be displayed inline in the browser, that is, as a Web page or as part of a Web page, or as an attachment, that is downloaded and saved locally.

Example

Content-Disposition: form-data; name="fieldName"; filename="filename.jpg"

RFC2616 Specification
The Expect request-header field is used to indicate that particular server behaviors are required by the client.

content-disposition = "Content-Disposition" ":" disposition-type *( ";" disposition-parm ) disposition-type = "attachment" | disp-extension-token disposition-parm = filename-parm | disp-extension-parm filename-parm = "filename" "=" quoted-string disp-extension-token = token disp-extension-parm = token "=" ( token | quoted-string )

See Also:
  • Constructor Details

    • ContentDisposition

      public ContentDisposition(String value)
      Constructor.
      Parameters:
      value - The header value.
      Must be parsable by StringRanges.of(String).
      Can be null.
    • ContentDisposition

      public ContentDisposition(org.apache.juneau.StringRanges value)
      Constructor.
      Parameters:
      value - The header value.
      Can be null.
    • ContentDisposition

      public ContentDisposition(Supplier<org.apache.juneau.StringRanges> value)
      Constructor with delayed value.

      Header value is re-evaluated on each call to BasicStringRangesHeader.getValue().

      Parameters:
      value - The supplier of the header value.
      Can be null.
  • Method Details

    • of

      public static ContentDisposition of(String value)
      Static creator.
      Parameters:
      value - The header value.
      Must be parsable by StringRanges.of(String).
      Can be null.
      Returns:
      A new header bean, or null if the value is null.
    • of

      public static ContentDisposition of(org.apache.juneau.StringRanges value)
      Static creator.
      Parameters:
      value - The header value.
      Can be null.
      Returns:
      A new header bean, or null if the value is null.
    • of

      public static ContentDisposition of(Supplier<org.apache.juneau.StringRanges> value)
      Static creator with delayed value.

      Header value is re-evaluated on each call to BasicStringRangesHeader.getValue().

      Parameters:
      value - The supplier of the header value.
      Can be null.
      Returns:
      A new header bean, or null if the value is null.