类 ContentDisposition
- java.lang.Object
- org.springframework.http.ContentDisposition
public final class ContentDisposition extends Object
Represent the Content-Disposition type and parameters as defined in RFC 6266.- 从以下版本开始:
- 5.0
- 作者:
- Sebastien Deleuze, Juergen Hoeller, Rossen Stoyanchev
- 另请参阅:
- RFC 6266
嵌套类概要
嵌套类 修饰符和类型 类 说明 static interfaceContentDisposition.BuilderA mutable builder forContentDisposition.
方法概要
所有方法 静态方法 实例方法 具体方法 已过时的方法 修饰符和类型 方法 说明 static ContentDisposition.Builderbuilder(String type)Return a builder for aContentDisposition.static ContentDispositionempty()Return an empty content disposition.booleanequals(Object other)CharsetgetCharset()Return the charset defined in filename* parameter, ornullif not defined.ZonedDateTimegetCreationDate()已过时。since 5.2.3 as per RFC 6266, Apendix B, to be removed in a future release.StringgetFilename()Return the value of the filename parameter (or the value of the filename* one decoded as defined in the RFC 5987), ornullif not defined.ZonedDateTimegetModificationDate()已过时。since 5.2.3 as per RFC 6266, Apendix B, to be removed in a future release.StringgetName()Return the value of the name parameter, ornullif not defined.ZonedDateTimegetReadDate()已过时。since 5.2.3 as per RFC 6266, Apendix B, to be removed in a future release.LonggetSize()已过时。since 5.2.3 as per RFC 6266, Apendix B, to be removed in a future release.StringgetType()Return the disposition type, like for example inline, attachment, form-data, ornullif not defined.inthashCode()static ContentDispositionparse(String contentDisposition)Parse a Content-Disposition header value as defined in RFC 2183.StringtoString()Return the header value for this content disposition as defined in RFC 6266.
方法详细资料
getType
@Nullable public String getType()
Return the disposition type, like for example inline, attachment, form-data, ornullif not defined.
getName
@Nullable public String getName()
Return the value of the name parameter, ornullif not defined.
getFilename
@Nullable public String getFilename()
Return the value of the filename parameter (or the value of the filename* one decoded as defined in the RFC 5987), ornullif not defined.
getCharset
@Nullable public Charset getCharset()
Return the charset defined in filename* parameter, ornullif not defined.
getSize
@Deprecated @Nullable public Long getSize()
已过时。since 5.2.3 as per RFC 6266, Apendix B, to be removed in a future release.Return the value of the size parameter, ornullif not defined.
getCreationDate
@Deprecated @Nullable public ZonedDateTime getCreationDate()
已过时。since 5.2.3 as per RFC 6266, Apendix B, to be removed in a future release.Return the value of the creation-date parameter, ornullif not defined.
getModificationDate
@Deprecated @Nullable public ZonedDateTime getModificationDate()
已过时。since 5.2.3 as per RFC 6266, Apendix B, to be removed in a future release.Return the value of the modification-date parameter, ornullif not defined.
getReadDate
@Deprecated @Nullable public ZonedDateTime getReadDate()
已过时。since 5.2.3 as per RFC 6266, Apendix B, to be removed in a future release.Return the value of the read-date parameter, ornullif not defined.
toString
public String toString()
Return the header value for this content disposition as defined in RFC 6266.- 覆盖:
toString在类中Object- 另请参阅:
parse(String)
builder
public static ContentDisposition.Builder builder(String type)
Return a builder for aContentDisposition.- 参数:
type- the disposition type like for example inline, attachment, or form-data- 返回:
- the builder
empty
public static ContentDisposition empty()
Return an empty content disposition.
parse
public static ContentDisposition parse(String contentDisposition)
Parse a Content-Disposition header value as defined in RFC 2183.- 参数:
contentDisposition- the Content-Disposition header value- 返回:
- the parsed content disposition
- 另请参阅:
toString()