Package de.xima.fc.http
Class ContentDisposition.Builder
- java.lang.Object
-
- de.xima.fc.http.ContentDisposition.Builder
-
- Enclosing class:
- ContentDisposition
public static final class ContentDisposition.Builder extends Object
A simple builder forContentDisposition
.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ContentDisposition
build()
Creates a content disposition with the current settings.String
buildHeaderValue()
Creates the value for a content disposition HTTP header with the current settings.ContentDisposition.Builder
charset(Charset charset)
Sets the charset for encoding the filename.ContentDisposition.Builder
fileName(String fileName)
Sets the filename of the file.ContentDisposition.Builder
name(String name)
Sets the name of the HTML field in the form that the content of this sub part refers to.
-
-
-
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.
-
-