當前位置: 首頁>>代碼示例>>Java>>正文


Java MultipartImpl類代碼示例

本文整理匯總了Java中org.apache.james.mime4j.message.MultipartImpl的典型用法代碼示例。如果您正苦於以下問題:Java MultipartImpl類的具體用法?Java MultipartImpl怎麽用?Java MultipartImpl使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


MultipartImpl類屬於org.apache.james.mime4j.message包,在下文中一共展示了MultipartImpl類的5個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: writeToFirstSingleBody

import org.apache.james.mime4j.message.MultipartImpl; //導入依賴的package包/類
private boolean writeToFirstSingleBody(Disposable body, OutputStream out) throws IOException {
	if(body instanceof SingleBody) {
		((SingleBody) body).writeTo(out);
		return true;
	}
	if(body instanceof MultipartImpl) {
		for(Entity childBody : ((MultipartImpl) body).getBodyParts()) {
			if(writeToFirstSingleBody(childBody, out)) {
				return true;
			}
		}
	}
	if(body instanceof BodyPart) {
		return writeToFirstSingleBody(((BodyPart) body).getBody(), out);
	}
	return false;
}
 
開發者ID:andreptb,項目名稱:smtp-server-for-it,代碼行數:18,代碼來源:MailMessageService.java

示例2: startMultipart

import org.apache.james.mime4j.message.MultipartImpl; //導入依賴的package包/類
/**
 * @see org.apache.james.mime4j.parser.ContentHandler#startMultipart(org.apache.james.mime4j.stream.BodyDescriptor)
 */
public void startMultipart(final BodyDescriptor bd) throws MimeException {
    expect(Entity.class);

    final Entity e = (Entity) stack.peek();
    final String subType = bd.getSubType();
    final Multipart multiPart = new MultipartImpl(subType);
    e.setBody(multiPart);
    stack.push(multiPart);
}
 
開發者ID:QSFT,項目名稱:MimeUI,代碼行數:13,代碼來源:MimeUIEntityBuilder.java

示例3: multipartReport

import org.apache.james.mime4j.message.MultipartImpl; //導入依賴的package包/類
private Multipart multipartReport() {
    Multipart result = new MultipartImpl("report");
    result.addBodyPart(humanReadableTextBodyPart());
    result.addBodyPart(deliveryStatusBodyPart());
    result.addBodyPart(originalMessageBodyPart());
    return result;
}
 
開發者ID:hontvari,項目名稱:mireka,代碼行數:8,代碼來源:DsnMailCreator.java

示例4: epilogue

import org.apache.james.mime4j.message.MultipartImpl; //導入依賴的package包/類
/**
 * @see org.apache.james.mime4j.parser.ContentHandler#epilogue(java.io.InputStream)
 */
public void epilogue(InputStream is) throws MimeException, IOException {
    expect(MultipartImpl.class);
    ByteSequence bytes = loadStream(is);
    ((MultipartImpl) stack.peek()).setEpilogueRaw(bytes);
}
 
開發者ID:QSFT,項目名稱:MimeUI,代碼行數:9,代碼來源:MimeUIEntityBuilder.java

示例5: preamble

import org.apache.james.mime4j.message.MultipartImpl; //導入依賴的package包/類
/**
 * @see org.apache.james.mime4j.parser.ContentHandler#preamble(java.io.InputStream)
 */
public void preamble(InputStream is) throws MimeException, IOException {
    expect(MultipartImpl.class);
    ByteSequence bytes = loadStream(is);
    ((MultipartImpl) stack.peek()).setPreambleRaw(bytes);
}
 
開發者ID:QSFT,項目名稱:MimeUI,代碼行數:9,代碼來源:MimeUIEntityBuilder.java


注:本文中的org.apache.james.mime4j.message.MultipartImpl類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。