本文整理了Java中javax.mail.internet.MimeMessage.getDescription()
方法的一些代码示例,展示了MimeMessage.getDescription()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。MimeMessage.getDescription()
方法的具体详情如下:
包路径:javax.mail.internet.MimeMessage
类名称:MimeMessage
方法名:getDescription
[英]Returns the "Content-Description" header field of this Message. This typically associates some descriptive information with this part. Returns null if this field is unavailable or its value is absent.
If the Content-Description field is encoded as per RFC 2047, it is decoded and converted into Unicode. If the decoding or conversion fails, the raw data is returned as-is
This implementation uses the getHeader
method to obtain the requisite header field.
[中]返回此消息的“内容描述”标题字段。这通常会将一些描述性信息与此零件相关联。如果此字段不可用或其值不存在,则返回null。
如果内容描述字段按照RFC 2047编码,则将其解码并转换为Unicode。如果解码或转换失败,原始数据将按原样返回
此实现使用getHeader
方法来获取所需的头字段。
代码示例来源:origin: camunda/camunda-bpm-platform
/**
* Get the decoded Content-Description.
*/
public String getDescription() throws MessagingException {
checkExpunged();
if (bodyLoaded)
return super.getDescription();
if (description != null) // cached value ?
return description;
loadBODYSTRUCTURE();
if (bs.description == null)
return null;
try {
description = MimeUtility.decodeText(bs.description);
} catch (UnsupportedEncodingException ex) {
description = bs.description;
}
return description;
}
代码示例来源:origin: com.sun.mail/javax.mail
/**
* Get the decoded Content-Description.
*/
@Override
public String getDescription() throws MessagingException {
checkExpunged();
if (bodyLoaded)
return super.getDescription();
if (description != null) // cached value ?
return description;
loadBODYSTRUCTURE();
if (bs.description == null)
return null;
try {
description = MimeUtility.decodeText(bs.description);
} catch (UnsupportedEncodingException ex) {
description = bs.description;
}
return description;
}
代码示例来源:origin: org.apache.james/james-server-core-library
/**
* @see javax.mail.Part#getDescription()
*/
public String getDescription() throws MessagingException {
return getWrappedMessage().getDescription();
}
代码示例来源:origin: com.sun.mail/jakarta.mail
/**
* Get the decoded Content-Description.
*/
@Override
public String getDescription() throws MessagingException {
checkExpunged();
if (bodyLoaded)
return super.getDescription();
if (description != null) // cached value ?
return description;
loadBODYSTRUCTURE();
if (bs.description == null)
return null;
try {
description = MimeUtility.decodeText(bs.description);
} catch (UnsupportedEncodingException ex) {
description = bs.description;
}
return description;
}
代码示例来源:origin: com.sun.mail/android-mail
/**
* Get the decoded Content-Description.
*/
@Override
public String getDescription() throws MessagingException {
checkExpunged();
if (bodyLoaded)
return super.getDescription();
if (description != null) // cached value ?
return description;
loadBODYSTRUCTURE();
if (bs.description == null)
return null;
try {
description = MimeUtility.decodeText(bs.description);
} catch (UnsupportedEncodingException ex) {
description = bs.description;
}
return description;
}
代码示例来源:origin: org.glassfish.metro/webservices-extra
/**
* Get the decoded Content-Description.
*/
@Override
public String getDescription() throws MessagingException {
checkExpunged();
if (bodyLoaded)
return super.getDescription();
if (description != null) // cached value ?
return description;
loadBODYSTRUCTURE();
if (bs.description == null)
return null;
try {
description = MimeUtility.decodeText(bs.description);
} catch (UnsupportedEncodingException ex) {
description = bs.description;
}
return description;
}
代码示例来源:origin: jboss/jboss-javaee-specs
/**
* Get the decoded Content-Description.
*/
@Override
public String getDescription() throws MessagingException {
checkExpunged();
if (bodyLoaded)
return super.getDescription();
if (description != null) // cached value ?
return description;
loadBODYSTRUCTURE();
if (bs.description == null)
return null;
try {
description = MimeUtility.decodeText(bs.description);
} catch (UnsupportedEncodingException ex) {
description = bs.description;
}
return description;
}
代码示例来源:origin: org.unitils.mail/unitils-mail
this.from = message.getEnvelopeSender();
this.subject = mimeMessage.getSubject();
this.body = mimeMessage.getDescription();
代码示例来源:origin: org.codelibs.fess/fess-crawler
putValue(data, "Content-Language", message.getContentLanguage());
putValue(data, "Content-MD5", message.getContentMD5());
putValue(data, "Description", message.getDescription());
putValue(data, "Disposition", message.getDisposition());
putValue(data, "Encoding", message.getEncoding());
代码示例来源:origin: org.codelibs.robot/s2-robot
putValue(data, "Description", message.getDescription());
} catch (Exception e) {
内容来源于网络,如有侵权,请联系作者删除!