本文整理了Java中javax.mail.internet.MimeBodyPart.getDisposition()
方法的一些代码示例,展示了MimeBodyPart.getDisposition()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。MimeBodyPart.getDisposition()
方法的具体详情如下:
包路径:javax.mail.internet.MimeBodyPart
类名称:MimeBodyPart
方法名:getDisposition
[英]Returns the disposition from the "Content-Disposition" header field. This represents the disposition of this part. The disposition describes how the part should be presented to the user.
If the Content-Disposition field is unavailable, null is returned.
This implementation uses getHeader(name)
to obtain the requisite header field.
[中]从“内容处置”标题字段返回处置。这表示该部件的配置。处置描述了零件应如何呈现给用户。
如果内容处置字段不可用,则返回null。
此实现使用getHeader(name)
获取必需的头字段。
代码示例来源:origin: camunda/camunda-bpm-platform
/**
* Returns the disposition from the "Content-Disposition" header field.
* This represents the disposition of this part. The disposition
* describes how the part should be presented to the user. <p>
*
* If the Content-Disposition field is unavailable,
* null is returned. <p>
*
* This implementation uses <code>getHeader(name)</code>
* to obtain the requisite header field.
*
* @exception MessagingException for failures
* @see #headers
*/
public String getDisposition() throws MessagingException {
return getDisposition(this);
}
代码示例来源:origin: camunda/camunda-bpm-platform
/**
* Returns the disposition from the "Content-Disposition" header field.
* This represents the disposition of this part. The disposition
* describes how the part should be presented to the user. <p>
*
* If the Content-Disposition field is unavailable,
* <code>null</code> is returned. <p>
*
* This implementation uses the <code>getHeader</code> method
* to obtain the requisite header field.
*
* @return disposition of this part, or null if unknown
* @exception MessagingException for failures
*/
public String getDisposition() throws MessagingException {
return MimeBodyPart.getDisposition(this);
}
代码示例来源:origin: com.sun.mail/javax.mail
/**
* Returns the disposition from the "Content-Disposition" header field.
* This represents the disposition of this part. The disposition
* describes how the part should be presented to the user. <p>
*
* If the Content-Disposition field is unavailable,
* <code>null</code> is returned. <p>
*
* This implementation uses the <code>getHeader</code> method
* to obtain the requisite header field.
*
* @return disposition of this part, or null if unknown
* @exception MessagingException for failures
*/
@Override
public String getDisposition() throws MessagingException {
return MimeBodyPart.getDisposition(this);
}
代码示例来源:origin: com.sun.mail/javax.mail
/**
* Returns the disposition from the "Content-Disposition" header field.
* This represents the disposition of this part. The disposition
* describes how the part should be presented to the user. <p>
*
* If the Content-Disposition field is unavailable,
* null is returned. <p>
*
* This implementation uses <code>getHeader(name)</code>
* to obtain the requisite header field.
*
* @exception MessagingException for failures
* @see #headers
*/
@Override
public String getDisposition() throws MessagingException {
return getDisposition(this);
}
代码示例来源:origin: javax.mail/javax.mail-api
/**
* Returns the disposition from the "Content-Disposition" header field.
* This represents the disposition of this part. The disposition
* describes how the part should be presented to the user. <p>
*
* If the Content-Disposition field is unavailable,
* null is returned. <p>
*
* This implementation uses <code>getHeader(name)</code>
* to obtain the requisite header field.
*
* @exception MessagingException for failures
* @see #headers
*/
@Override
public String getDisposition() throws MessagingException {
return getDisposition(this);
}
代码示例来源:origin: javax.mail/javax.mail-api
/**
* Returns the disposition from the "Content-Disposition" header field.
* This represents the disposition of this part. The disposition
* describes how the part should be presented to the user. <p>
*
* If the Content-Disposition field is unavailable,
* <code>null</code> is returned. <p>
*
* This implementation uses the <code>getHeader</code> method
* to obtain the requisite header field.
*
* @return disposition of this part, or null if unknown
* @exception MessagingException for failures
*/
@Override
public String getDisposition() throws MessagingException {
return MimeBodyPart.getDisposition(this);
}
代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.javax.mail
/**
* Returns the value of the "Content-Disposition" header field.
* This represents the disposition of this part. The disposition
* describes how the part should be presented to the user. <p>
*
* If the Content-Disposition field is unavailable,
* null is returned. <p>
*
* This implementation uses <code>getHeader(name)</code>
* to obtain the requisite header field.
*
* @see #headers
*/
public String getDisposition() throws MessagingException {
return getDisposition(this);
}
代码示例来源:origin: javax.mail/com.springsource.javax.mail
/**
* Returns the value of the "Content-Disposition" header field.
* This represents the disposition of this part. The disposition
* describes how the part should be presented to the user. <p>
*
* If the Content-Disposition field is unavailable,
* null is returned. <p>
*
* This implementation uses <code>getHeader(name)</code>
* to obtain the requisite header field.
*
* @see #headers
*/
public String getDisposition() throws MessagingException {
return getDisposition(this);
}
代码示例来源:origin: javax.mail/com.springsource.javax.mail
/**
* Returns the value of the "Content-Disposition" header field.
* This represents the disposition of this part. The disposition
* describes how the part should be presented to the user. <p>
*
* If the Content-Disposition field is unavailable,
* <code>null</code> is returned. <p>
*
* This implementation uses the <code>getHeader</code> method
* to obtain the requisite header field.
*
* @return disposition of this part, or null if unknown
* @exception MessagingException
*/
public String getDisposition() throws MessagingException {
return MimeBodyPart.getDisposition(this);
}
代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.javax.mail
/**
* Returns the value of the "Content-Disposition" header field.
* This represents the disposition of this part. The disposition
* describes how the part should be presented to the user. <p>
*
* If the Content-Disposition field is unavailable,
* <code>null</code> is returned. <p>
*
* This implementation uses the <code>getHeader</code> method
* to obtain the requisite header field.
*
* @return disposition of this part, or null if unknown
* @exception MessagingException
*/
public String getDisposition() throws MessagingException {
return MimeBodyPart.getDisposition(this);
}
代码示例来源:origin: com.sun.mail/jakarta.mail
/**
* Returns the disposition from the "Content-Disposition" header field.
* This represents the disposition of this part. The disposition
* describes how the part should be presented to the user. <p>
*
* If the Content-Disposition field is unavailable,
* <code>null</code> is returned. <p>
*
* This implementation uses the <code>getHeader</code> method
* to obtain the requisite header field.
*
* @return disposition of this part, or null if unknown
* @exception MessagingException for failures
*/
@Override
public String getDisposition() throws MessagingException {
return MimeBodyPart.getDisposition(this);
}
代码示例来源:origin: com.sun.mail/android-mail
/**
* Returns the disposition from the "Content-Disposition" header field.
* This represents the disposition of this part. The disposition
* describes how the part should be presented to the user. <p>
*
* If the Content-Disposition field is unavailable,
* null is returned. <p>
*
* This implementation uses <code>getHeader(name)</code>
* to obtain the requisite header field.
*
* @exception MessagingException for failures
* @see #headers
*/
@Override
public String getDisposition() throws MessagingException {
return getDisposition(this);
}
代码示例来源:origin: com.sun.mail/mailapi
/**
* Returns the disposition from the "Content-Disposition" header field.
* This represents the disposition of this part. The disposition
* describes how the part should be presented to the user. <p>
*
* If the Content-Disposition field is unavailable,
* <code>null</code> is returned. <p>
*
* This implementation uses the <code>getHeader</code> method
* to obtain the requisite header field.
*
* @return disposition of this part, or null if unknown
* @exception MessagingException for failures
*/
@Override
public String getDisposition() throws MessagingException {
return MimeBodyPart.getDisposition(this);
}
代码示例来源:origin: com.sun.mail/android-mail
/**
* Returns the disposition from the "Content-Disposition" header field.
* This represents the disposition of this part. The disposition
* describes how the part should be presented to the user. <p>
*
* If the Content-Disposition field is unavailable,
* <code>null</code> is returned. <p>
*
* This implementation uses the <code>getHeader</code> method
* to obtain the requisite header field.
*
* @return disposition of this part, or null if unknown
* @exception MessagingException for failures
*/
@Override
public String getDisposition() throws MessagingException {
return MimeBodyPart.getDisposition(this);
}
代码示例来源:origin: com.sun.mail/mailapi
/**
* Returns the disposition from the "Content-Disposition" header field.
* This represents the disposition of this part. The disposition
* describes how the part should be presented to the user. <p>
*
* If the Content-Disposition field is unavailable,
* null is returned. <p>
*
* This implementation uses <code>getHeader(name)</code>
* to obtain the requisite header field.
*
* @exception MessagingException for failures
* @see #headers
*/
@Override
public String getDisposition() throws MessagingException {
return getDisposition(this);
}
代码示例来源:origin: com.sun.mail/jakarta.mail
/**
* Returns the disposition from the "Content-Disposition" header field.
* This represents the disposition of this part. The disposition
* describes how the part should be presented to the user. <p>
*
* If the Content-Disposition field is unavailable,
* null is returned. <p>
*
* This implementation uses <code>getHeader(name)</code>
* to obtain the requisite header field.
*
* @exception MessagingException for failures
* @see #headers
*/
@Override
public String getDisposition() throws MessagingException {
return getDisposition(this);
}
代码示例来源:origin: org.glassfish.metro/webservices-extra
/**
* Returns the disposition from the "Content-Disposition" header field.
* This represents the disposition of this part. The disposition
* describes how the part should be presented to the user. <p>
*
* If the Content-Disposition field is unavailable,
* null is returned. <p>
*
* This implementation uses <code>getHeader(name)</code>
* to obtain the requisite header field.
*
* @exception MessagingException for failures
* @see #headers
*/
@Override
public String getDisposition() throws MessagingException {
return getDisposition(this);
}
代码示例来源:origin: stackoverflow.com
Multipart multiPart = (Multipart) message.getContent();
for (int i = 0; i < multiPart.getCount(); i++) {
MimeBodyPart part = (MimeBodyPart) multiPart.getBodyPart(i);
if (Part.ATTACHMENT.equalsIgnoreCase(part.getDisposition())) {
// this part is attachment
// code to save attachment...
}
}
代码示例来源:origin: stackoverflow.com
if (mimeMessage.getContentType().contains("multipart")) {
Multipart multiPart = (Multipart) mimeMessage.getContent();
messageContent = (String)messageContent;
messageContent = "";
for (int partCount = 0; partCount < multiPart.getCount(); partCount++) {
MimeBodyPart part = (MimeBodyPart) multiPart
.getBodyPart(partCount);
if (!Part.ATTACHMENT
.equalsIgnoreCase(part.getDisposition())) {
// this part is the message content
content = getText(part,embededImgMap);
}
}
}
代码示例来源:origin: stackoverflow.com
if( mimeMessage.getContent() instanceof Multipart) {
Multipart multipartContent = (Multipart) mimeMessage.getContent();
List<BodyPart> deleteThese = new ArrayList<BodyPart>();
for( int i = 0; i < multipartContent.getCount(); i++ ) {
MimeBodyPart part = (MimeBodyPart) multipartContent.getBodyPart(i);
String disposition = part.getDisposition();
if( disposition != null
&& ( disposition.equalsIgnoreCase( Part.ATTACHMENT )
|| ( disposition.equalsIgnoreCase( Part.INLINE )
&& !part.isMimeType( PLAIN_TEXT_MIME_TYPE )
&& !part.isMimeType( HTML_MIME_TYPE ) )
) ) {
// do something with part
}
}
内容来源于网络,如有侵权,请联系作者删除!