本文整理汇总了Java中com.sun.xml.internal.ws.resources.EncodingMessages.NO_SUCH_CONTENT_ID属性的典型用法代码示例。如果您正苦于以下问题:Java EncodingMessages.NO_SUCH_CONTENT_ID属性的具体用法?Java EncodingMessages.NO_SUCH_CONTENT_ID怎么用?Java EncodingMessages.NO_SUCH_CONTENT_ID使用的例子?那么恭喜您, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在类com.sun.xml.internal.ws.resources.EncodingMessages
的用法示例。
在下文中一共展示了EncodingMessages.NO_SUCH_CONTENT_ID属性的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: get
@Nullable
public Attachment get(String contentId) {
Attachment att;
/**
* First try to get the Attachment from internal map, maybe this attachment
* is added by the user.
*/
att = atts.get(contentId);
if(att != null)
return att;
try {
/**
* Attachment is not found in the internal map, now do look in
* the mpp, if found add to the internal Attachment map.
*/
att = mpp.getAttachmentPart(contentId);
if(att != null){
atts.put(contentId, att);
}
} catch (IOException e) {
throw new WebServiceException(EncodingMessages.NO_SUCH_CONTENT_ID(contentId), e);
}
return att;
}
示例2: getAttachmentAsDataHandler
@Override
public DataHandler getAttachmentAsDataHandler(String cid) {
Attachment a = attachments.get(stripScheme(cid));
if(a==null)
throw new WebServiceException(EncodingMessages.NO_SUCH_CONTENT_ID(cid));
return a.asDataHandler();
}
示例3: getAttachmentAsByteArray
@Override
public byte[] getAttachmentAsByteArray(String cid) {
Attachment a = attachments.get(stripScheme(cid));
if(a==null)
throw new WebServiceException(EncodingMessages.NO_SUCH_CONTENT_ID(cid));
return a.asByteArray();
}