类 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 interface
ContentDisposition.Builder
A mutable builder forContentDisposition
.
方法概要
所有方法 静态方法 实例方法 具体方法 已过时的方法 修饰符和类型 方法 说明 static ContentDisposition.Builder
builder(String type)
Return a builder for aContentDisposition
.static ContentDisposition
empty()
Return an empty content disposition.boolean
equals(Object other)
Charset
getCharset()
Return the charset defined in filename* parameter, ornull
if not defined.ZonedDateTime
getCreationDate()
已过时。since 5.2.3 as per RFC 6266, Apendix B, to be removed in a future release.String
getFilename()
Return the value of the filename parameter (or the value of the filename* one decoded as defined in the RFC 5987), ornull
if not defined.ZonedDateTime
getModificationDate()
已过时。since 5.2.3 as per RFC 6266, Apendix B, to be removed in a future release.String
getName()
Return the value of the name parameter, ornull
if not defined.ZonedDateTime
getReadDate()
已过时。since 5.2.3 as per RFC 6266, Apendix B, to be removed in a future release.Long
getSize()
已过时。since 5.2.3 as per RFC 6266, Apendix B, to be removed in a future release.String
getType()
Return the disposition type, like for example inline, attachment, form-data, ornull
if not defined.int
hashCode()
static ContentDisposition
parse(String contentDisposition)
Parse a Content-Disposition header value as defined in RFC 2183.String
toString()
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, ornull
if not defined.
getName
@Nullable public String getName()
Return the value of the name parameter, ornull
if 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), ornull
if not defined.
getCharset
@Nullable public Charset getCharset()
Return the charset defined in filename* parameter, ornull
if 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, ornull
if 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, ornull
if 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, ornull
if 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, ornull
if 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()