Package org.apache.juneau.http.header
Class ContentDisposition
java.lang.Object
org.apache.juneau.http.header.HttpHeaderBean
org.apache.juneau.http.header.HttpStringRangesHeader
org.apache.juneau.http.header.ContentDisposition
- All Implemented Interfaces:
HttpHeader
Represents an HTTP Content-Disposition header.
Content disposition (inline / attachment / filename).
- Since:
- 9.2.1
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classFluent builder for assembling an HTTPContent-Disposition header value. -
Field Summary
FieldsFields inherited from class org.apache.juneau.http.header.HttpStringRangesHeader
LAZY_STRING_RANGES, LAZY_WIRE_STRING -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic ContentDispositionattachment(String filename) Returns aContent-Dispositionheader value of the formattachment; filename="<filename>"with the file name properly escaped (backslashes and double-quotes are backslash-escaped).static ContentDisposition.Buildercreate()Creates a new emptyContentDisposition.Builder.static ContentDispositionstatic ContentDispositionof(StringRanges value) static ContentDispositionofLazyParsed(Supplier<StringRanges> supplier) static ContentDispositionofLazyWire(Supplier<String> supplier) Methods inherited from class org.apache.juneau.http.header.HttpStringRangesHeader
asStringRanges, getRange, match, of, of, orElse, toStringRangesMethods inherited from class org.apache.juneau.http.header.HttpHeaderBean
equals, equalsIgnoreCase, getName, getValue, hashCode, of, toString
-
Field Details
-
NAME
- See Also:
-
-
Constructor Details
-
ContentDisposition
-
ContentDisposition
-
-
Method Details
-
of
-
of
-
ofLazyWire
-
ofLazyParsed
-
attachment
Returns aContent-Dispositionheader value of the formattachment; filename="<filename>"with the file name properly escaped (backslashes and double-quotes are backslash-escaped).- Parameters:
filename- The attachment filename. Must not benull, blank, or contain CR/LF characters.- Returns:
- A new
ContentDispositionheader. - Throws:
IllegalArgumentException- Iffilenameis invalid.
-
create
Creates a new emptyContentDisposition.Builder.- Returns:
- A new builder. Never
null .
-