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 Summary
Nested ClassesModifier and TypeClassDescriptionstatic interfaceA mutable builder forContentDisposition. - 
Method Summary
Modifier 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
- 
isAttachment
public boolean isAttachment()Return whether thetypeis "attachment".- Since:
 - 5.3
 
 - 
isFormData
public boolean isFormData()Return whether thetypeis "form-data".- Since:
 - 5.3
 
 - 
isInline
public boolean isInline()Return whether thetypeis "inline".- Since:
 - 5.3
 
 - 
getType
Return the disposition type.- See Also:
 
 - 
getName
Return the value of the name parameter, ornullif not defined. - 
getFilename
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. - 
getCharset
Return the charset defined in filename* parameter, ornullif not defined. - 
getSize
Deprecated.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. - 
getCreationDate
Deprecated.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. - 
getModificationDate
Deprecated.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. - 
getReadDate
Deprecated.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
 - 
hashCode
public int hashCode() - 
toString
Return the header value for this content disposition as defined in RFC 6266. - 
attachment
Return a builder for aContentDispositionof type "attachment".- Since:
 - 5.3
 
 - 
formData
Return a builder for aContentDispositionof type "form-data".- Since:
 - 5.3
 
 - 
inline
Return a builder for aContentDispositionof type "inline".- Since:
 - 5.3
 
 - 
builder
Return a builder for aContentDisposition.- Parameters:
 type- the disposition type like for example inline, attachment, or form-data- Returns:
 - the builder
 
 - 
empty
Return an empty content disposition. - 
parse
Parse a Content-Disposition header value as defined in RFC 2183.- Parameters:
 contentDisposition- the Content-Disposition header value- Returns:
 - the parsed content disposition
 - See Also:
 
 
 -