Package org.springframework.http
Class ContentDisposition
java.lang.Object
org.springframework.http.ContentDisposition
Representation of the Content-Disposition type and parameters as defined in RFC 6266.
- Since:
- 5.0
- Author:
- Sebastien Deleuze, Juergen Hoeller, Rossen Stoyanchev, Sergey Tsypanov
- See Also:
- 
Nested Class SummaryNested ClassesModifier and TypeClassDescriptionstatic interfaceA mutable builder forContentDisposition.
- 
Method SummaryModifier and TypeMethodDescriptionstatic ContentDisposition.BuilderReturn a builder for aContentDispositionof type "attachment".static ContentDisposition.BuilderReturn a builder for aContentDisposition.static ContentDispositionempty()Return an empty content disposition.booleanstatic ContentDisposition.BuilderformData()Return a builder for aContentDispositionof type "form-data".Return the charset defined in filename* parameter, ornullif not defined.Deprecated.since 5.2.3 as per RFC 6266, Appendix B, to be removed in a future release.Return the value of the filename parameter, possibly decoded from BASE64 encoding based on RFC 2047, or of the filename* parameter, possibly decoded as defined in the RFC 5987.Deprecated.since 5.2.3 as per RFC 6266, Appendix B, to be removed in a future release.getName()Return the value of the name parameter, ornullif not defined.Deprecated.since 5.2.3 as per RFC 6266, Appendix B, to be removed in a future release.getSize()Deprecated.since 5.2.3 as per RFC 6266, Appendix B, to be removed in a future release.getType()Return the disposition type.inthashCode()static ContentDisposition.Builderinline()Return a builder for aContentDispositionof type "inline".booleanReturn whether thetypeis "attachment".booleanReturn whether thetypeis "form-data".booleanisInline()Return whether thetypeis "inline".static ContentDispositionParse a Content-Disposition header value as defined in RFC 2183.toString()Return the header value for this content disposition as defined in RFC 6266.
- 
Method Details- 
isAttachmentpublic boolean isAttachment()Return whether thetypeis "attachment".- Since:
- 5.3
 
- 
isFormDatapublic boolean isFormData()Return whether thetypeis "form-data".- Since:
- 5.3
 
- 
isInlinepublic boolean isInline()Return whether thetypeis "inline".- Since:
- 5.3
 
- 
getTypeReturn the disposition type.- See Also:
 
- 
getNameReturn the value of the name parameter, ornullif not defined.
- 
getFilenameReturn the value of the filename parameter, possibly decoded from BASE64 encoding based on RFC 2047, or of the filename* parameter, possibly decoded as defined in the RFC 5987.
- 
getCharsetReturn the charset defined in filename* parameter, ornullif not defined.
- 
getSizeDeprecated.since 5.2.3 as per RFC 6266, Appendix B, to be removed in a future release.Return the value of the size parameter, ornullif not defined.
- 
getCreationDateDeprecated.since 5.2.3 as per RFC 6266, Appendix B, to be removed in a future release.Return the value of the creation-date parameter, ornullif not defined.
- 
getModificationDateDeprecated.since 5.2.3 as per RFC 6266, Appendix B, to be removed in a future release.Return the value of the modification-date parameter, ornullif not defined.
- 
getReadDateDeprecated.since 5.2.3 as per RFC 6266, Appendix B, to be removed in a future release.Return the value of the read-date parameter, ornullif not defined.
- 
equals
- 
hashCodepublic int hashCode()
- 
toStringReturn the header value for this content disposition as defined in RFC 6266.
- 
attachmentReturn a builder for aContentDispositionof type "attachment".- Since:
- 5.3
 
- 
formDataReturn a builder for aContentDispositionof type "form-data".- Since:
- 5.3
 
- 
inlineReturn a builder for aContentDispositionof type "inline".- Since:
- 5.3
 
- 
builderReturn a builder for aContentDisposition.- Parameters:
- type- the disposition type like for example inline, attachment, or form-data
- Returns:
- the builder
 
- 
emptyReturn an empty content disposition.
- 
parseParse a Content-Disposition header value as defined in RFC 2183.- Parameters:
- contentDisposition- the Content-Disposition header value
- Returns:
- the parsed content disposition
- See Also:
 
 
-