当前位置: 首页>>代码示例>>Java>>正文


Java Header类代码示例

本文整理汇总了Java中com.sun.xml.internal.messaging.saaj.packaging.mime.Header的典型用法代码示例。如果您正苦于以下问题:Java Header类的具体用法?Java Header怎么用?Java Header使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


Header类属于com.sun.xml.internal.messaging.saaj.packaging.mime包,在下文中一共展示了Header类的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: copyMimeHeaders

import com.sun.xml.internal.messaging.saaj.packaging.mime.Header; //导入依赖的package包/类
public static void copyMimeHeaders(MimeBodyPart mbp, AttachmentPartImpl ap)
    throws SOAPException {
    try {
        List hdr = mbp.getAllHeaders();
        int sz = hdr.size();
        for( int i=0; i<sz; i++ ) {
            Header h = (Header)hdr.get(i);
            if(h.getName().equalsIgnoreCase("Content-Type"))
                continue;   // skip
            ap.addMimeHeader(h.getName(), h.getValue());
        }
    } catch (Exception ex) {
        log.severe("SAAJ0506.soap.cannot.copy.mime.hdrs.into.attachment");
        throw new SOAPExceptionImpl(
            "Unable to copy MIME headers into attachment",
            ex);
    }
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:19,代码来源:AttachmentPartImpl.java

示例2: AttachmentPartImpl

import com.sun.xml.internal.messaging.saaj.packaging.mime.Header; //导入依赖的package包/类
public AttachmentPartImpl(MIMEPart part) {
    headers = new MimeHeaders();
    mimePart = part;
    List<? extends com.sun.xml.internal.org.jvnet.mimepull.Header> hdrs = part.getAllHeaders();
    for (com.sun.xml.internal.org.jvnet.mimepull.Header hd : hdrs) {
        headers.addHeader(hd.getName(), hd.getValue());
    }
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:9,代码来源:AttachmentPartImpl.java

示例3: setMimeHeaders

import com.sun.xml.internal.messaging.saaj.packaging.mime.Header; //导入依赖的package包/类
private void setMimeHeaders(SOAPPart soapPart,
        MimeBodyPart soapMessagePart) throws Exception {

    // first remove the existing content-type
    soapPart.removeAllMimeHeaders();
    // add everything present in soapMessagePart
    List headers = soapMessagePart.getAllHeaders();
    int sz = headers.size();
    for( int i=0; i<sz; i++ ) {
        Header h = (Header) headers.get(i);
        soapPart.addMimeHeader(h.getName(), h.getValue());
    }
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:14,代码来源:MessageImpl.java

示例4: MimeBodyPart

import com.sun.xml.internal.messaging.saaj.packaging.mime.Header; //导入依赖的package包/类
public MimeBodyPart(MIMEPart part) {
   mimePart = part;
   headers = new InternetHeaders();
   List<? extends com.sun.xml.internal.org.jvnet.mimepull.Header> hdrs = mimePart.getAllHeaders();
    for (com.sun.xml.internal.org.jvnet.mimepull.Header hd : hdrs) {
        headers.addHeader(hd.getName(), hd.getValue());
    }
}
 
开发者ID:campolake,项目名称:openjdk9,代码行数:9,代码来源:MimeBodyPart.java

示例5: getAllHeaders

import com.sun.xml.internal.messaging.saaj.packaging.mime.Header; //导入依赖的package包/类
/**
 * Return all the headers as an Enumeration of
 * {@link Header} objects.
 *
 * @return  Header objects
 */
public List<? extends Header> getAllHeaders() {
    return headers; // conceptually it should be read-only, but for performance reason I'm not wrapping it here
}
 
开发者ID:campolake,项目名称:openjdk9,代码行数:10,代码来源:InternetHeaders.java

示例6: getAllHeaders

import com.sun.xml.internal.messaging.saaj.packaging.mime.Header; //导入依赖的package包/类
/**
 * Return all the headers from this Message as an Enumeration of
 * Header objects.
 */
public List<? extends Header> getAllHeaders() {
    return headers.getAllHeaders();
}
 
开发者ID:campolake,项目名称:openjdk9,代码行数:8,代码来源:MimeBodyPart.java


注:本文中的com.sun.xml.internal.messaging.saaj.packaging.mime.Header类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。