Class ContentDisposition.Builder

    • Method Detail

      • build

        public ContentDisposition build()
        Creates a content disposition with the current settings. Subsequent changes to this builder do not affect the returned ContentDisposition.
        Returns:
        The new content disposition.
      • buildHeaderValue

        public String buildHeaderValue()
        Creates the value for a content disposition HTTP header with the current settings.
        Returns:
        The header value.
      • charset

        public ContentDisposition.Builder charset​(Charset charset)
        Sets the charset for encoding the filename.
        Parameters:
        charset - The charset.
        Returns:
        This builder.
      • fileName

        public ContentDisposition.Builder fileName​(String fileName)
        Sets the filename of the file.
        Parameters:
        fileName - The filename.
        Returns:
        This builder.
      • name

        public ContentDisposition.Builder name​(String name)
        Sets the name of the HTML field in the form that the content of this sub part refers to.
        Parameters:
        name - The name.
        Returns:
        This builder.