Class ContentDispositionBuilder

java.lang.Object
com.linecorp.armeria.common.ContentDispositionBuilder

public final class ContentDispositionBuilder extends Object
A builder class for creating ContentDisposition.
  • Method Details

    • name

      public ContentDispositionBuilder name(String name)
      Sets the value of the name parameter.
    • filename

      public ContentDispositionBuilder filename(String filename)
      Sets the value of the filename parameter. The given filename 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".
    • filename

      public ContentDispositionBuilder filename(String filename, @Nullable @Nullable Charset charset)
      Sets the value of the filename* that will be encoded as defined in the RFC 5987. Only the US-ASCII, UTF-8 and ISO-8859-1 charsets are supported.

      Note: Do not use this for a "multipart/form-data" requests as per RFC 7578, Section 4.2 and also RFC 5987 itself mentions it does not apply to multipart requests.

    • build

      public ContentDisposition build()
      Returns a newly-created ContentDisposition based on the properties of this builder.