ContentDisposition (Java EE 5 SDK)

Java

Java EE 5 SDK

深圳电信培训中心.徐海蛟老师.


javax.mail.internet Class ContentDisposition

java.lang.Object
  extended by javax.mail.internet.ContentDisposition

public class ContentDisposition
extends Object

This class represents a MIME ContentDisposition value. It provides methods to parse a ContentDisposition string into individual components and to generate a MIME style ContentDisposition string.

版本:
1.9, 07/05/04
作者:
John Mani

构造器摘要
ContentDisposition()
          No-arg Constructor.
ContentDisposition(String s)
          Constructor that takes a ContentDisposition string.
ContentDisposition(String disposition, ParameterList list)
          Constructor.
 
方法摘要
 String getDisposition()
          Return the disposition value.
 String getParameter(String name)
          Return the specified parameter value.
 ParameterList getParameterList()
          Return a ParameterList object that holds all the available parameters.
 void setDisposition(String disposition)
          Set the disposition.
 void setParameter(String name, String value)
          Set the specified parameter.
 void setParameterList(ParameterList list)
          Set a new ParameterList.
 String toString()
          Retrieve a RFC2045 style string representation of this ContentDisposition.
 
类方法继承 java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

构造器详细信息

ContentDisposition

public ContentDisposition()
No-arg Constructor.


ContentDisposition

public ContentDisposition(String disposition,
                          ParameterList list)
Constructor.

参数:
disposition - disposition
list - ParameterList
从以下版本开始:
JavaMail 1.2


ContentDisposition

public ContentDisposition(String s)
                   throws ParseException
Constructor that takes a ContentDisposition string. The String is parsed into its constituents: dispostion and parameters. A ParseException is thrown if the parse fails.

参数:
s - the ContentDisposition string.
抛出异常:
ParseException - if the parse fails.
从以下版本开始:
JavaMail 1.2

方法详细信息

getDisposition

public String getDisposition()
Return the disposition value.

返回:
the disposition
从以下版本开始:
JavaMail 1.2

getParameter

public String getParameter(String name)
Return the specified parameter value. Returns null if this parameter is absent.

返回:
parameter value
从以下版本开始:
JavaMail 1.2

getParameterList

public ParameterList getParameterList()
Return a ParameterList object that holds all the available parameters. Returns null if no parameters are available.

返回:
ParameterList
从以下版本开始:
JavaMail 1.2

setDisposition

public void setDisposition(String disposition)
Set the disposition. Replaces the existing disposition.

参数:
disposition - the disposition
从以下版本开始:
JavaMail 1.2

setParameter

public void setParameter(String name,
                         String value)
Set the specified parameter. If this parameter already exists, it is replaced by this new value.

参数:
name - parameter name
value - parameter value
从以下版本开始:
JavaMail 1.2

setParameterList

public void setParameterList(ParameterList list)
Set a new ParameterList.

参数:
list - ParameterList
从以下版本开始:
JavaMail 1.2

toString

public String toString()
Retrieve a RFC2045 style string representation of this ContentDisposition. Returns null if the conversion failed.

重写:
toString in class Object
返回:
RFC2045 style string
从以下版本开始:
JavaMail 1.2

Java EE 5 SDK

深圳电信培训中心.徐海蛟老师.


提交错误或意见

版权所有 2007 Sun Microsystems, Inc. 保留所有权利。 请遵守许可证条款。深圳电信培训中心.徐海蛟老师教学参考.