本文整理汇总了Java中javax.mail.internet.ParseException类的典型用法代码示例。如果您正苦于以下问题:Java ParseException类的具体用法?Java ParseException怎么用?Java ParseException使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
ParseException类属于javax.mail.internet包,在下文中一共展示了ParseException类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: sendMessage
import javax.mail.internet.ParseException; //导入依赖的package包/类
public void sendMessage (Message oMsg,
Address[] aAdrFrom, Address[] aAdrReply,
Address[] aAdrTo, Address[] aAdrCc, Address[] aAdrBcc)
throws NoSuchProviderException,SendFailedException,ParseException,
MessagingException,NullPointerException {
oMsg.addFrom(aAdrFrom);
if (null==aAdrReply)
oMsg.setReplyTo(aAdrReply);
else
oMsg.setReplyTo(aAdrFrom);
if (aAdrTo!=null) oMsg.addRecipients(javax.mail.Message.RecipientType.TO, aAdrTo);
if (aAdrCc!=null) oMsg.addRecipients(javax.mail.Message.RecipientType.CC, aAdrCc);
if (aAdrBcc!=null) oMsg.addRecipients(javax.mail.Message.RecipientType.BCC, aAdrBcc);
oMsg.setSentDate(new java.util.Date());
Transport.send(oMsg);
}
开发者ID:sergiomt,项目名称:zesped,代码行数:17,代码来源:MailSessionHandler.java
示例2: GenerateInvoiceDocumentReceiptXml
import javax.mail.internet.ParseException; //导入依赖的package包/类
public GeneratedFile GenerateInvoiceDocumentReceiptXml(String boxId, String messageId, String attachmentId, SignerProtos.Signer signer)
throws IllegalStateException, IOException, ParseException {
if (boxId == null)
throw new NullPointerException("boxId");
if (messageId == null)
throw new NullPointerException("messageId");
if (attachmentId == null)
throw new NullPointerException("attachmentId");
if (signer == null)
throw new NullPointerException("signer");
List<NameValuePair> parameters = new ArrayList<NameValuePair>();
parameters.add(new BasicNameValuePair("boxId", boxId));
parameters.add(new BasicNameValuePair("messageId", messageId));
parameters.add(new BasicNameValuePair("attachmentId", attachmentId));
HttpResponse webResponse = ReceivePostHttpResponse("/GenerateInvoiceDocumentReceiptXml", parameters, signer.toByteArray());
return new GeneratedFile(GetHttpResponseFileName(webResponse), GetResponseBytes(webResponse));
}
开发者ID:diadoc,项目名称:diadocsdk-java,代码行数:20,代码来源:DiadocApi.java
示例3: GenerateDocumentReceiptXml
import javax.mail.internet.ParseException; //导入依赖的package包/类
public GeneratedFile GenerateDocumentReceiptXml(String boxId, String messageId, String attachmentId, SignerProtos.Signer signer)
throws IllegalStateException, IOException, ParseException {
if (boxId == null)
throw new NullPointerException("boxId");
if (messageId == null)
throw new NullPointerException("messageId");
if (attachmentId == null)
throw new NullPointerException("attachmentId");
if (signer == null)
throw new NullPointerException("signer");
List<NameValuePair> parameters = new ArrayList<NameValuePair>();
parameters.add(new BasicNameValuePair("boxId", boxId));
parameters.add(new BasicNameValuePair("messageId", messageId));
parameters.add(new BasicNameValuePair("attachmentId", attachmentId));
HttpResponse webResponse = ReceivePostHttpResponse("/GenerateDocumentReceiptXml", parameters, signer.toByteArray());
return new GeneratedFile(GetHttpResponseFileName(webResponse), GetResponseBytes(webResponse));
}
开发者ID:diadoc,项目名称:diadocsdk-java,代码行数:20,代码来源:DiadocApi.java
示例4: GenerateInvoiceCorrectionRequestXml
import javax.mail.internet.ParseException; //导入依赖的package包/类
public GeneratedFile GenerateInvoiceCorrectionRequestXml(String boxId, String messageId, String attachmentId,
InvoiceCorrectionRequestInfoProtos.InvoiceCorrectionRequestInfo invoiceCorrectionInfo) throws IllegalStateException, IOException, ParseException {
if (boxId == null)
throw new NullPointerException("boxId");
if (messageId == null)
throw new NullPointerException("messageId");
if (attachmentId == null)
throw new NullPointerException("attachmentId");
List<NameValuePair> parameters = new ArrayList<NameValuePair>();
parameters.add(new BasicNameValuePair("boxId", boxId));
parameters.add(new BasicNameValuePair("messageId", messageId));
parameters.add(new BasicNameValuePair("attachmentId", attachmentId));
HttpResponse webResponse = ReceivePostHttpResponse("/GenerateInvoiceCorrectionRequestXml", parameters, invoiceCorrectionInfo.toByteArray());
return new GeneratedFile(GetHttpResponseFileName(webResponse), GetResponseBytes(webResponse));
}
开发者ID:diadoc,项目名称:diadocsdk-java,代码行数:18,代码来源:DiadocApi.java
示例5: GenerateRevocationRequestXml
import javax.mail.internet.ParseException; //导入依赖的package包/类
public GeneratedFile GenerateRevocationRequestXml(String boxId, String messageId, String attachmentId,
RevocationRequestInfoProtos.RevocationRequestInfo revocationRequestInfo) throws IllegalStateException, IOException, ParseException {
if (boxId == null)
throw new NullPointerException("boxId");
if (messageId == null)
throw new NullPointerException("messageId");
if (attachmentId == null)
throw new NullPointerException("attachmentId");
List<NameValuePair> parameters = new ArrayList<NameValuePair>();
parameters.add(new BasicNameValuePair("boxId", boxId));
parameters.add(new BasicNameValuePair("messageId", messageId));
parameters.add(new BasicNameValuePair("attachmentId", attachmentId));
HttpResponse webResponse = ReceivePostHttpResponse("/GenerateRevocationRequestXml", parameters, revocationRequestInfo.toByteArray());
return new GeneratedFile(GetHttpResponseFileName(webResponse), GetResponseBytes(webResponse));
}
开发者ID:diadoc,项目名称:diadocsdk-java,代码行数:18,代码来源:DiadocApi.java
示例6: GenerateSignatureRejectionXml
import javax.mail.internet.ParseException; //导入依赖的package包/类
public GeneratedFile GenerateSignatureRejectionXml(String boxId, String messageId, String attachmentId,
SignatureRejectionInfoProtos.SignatureRejectionInfo signatureRejectionInfo) throws IllegalStateException, IOException, ParseException {
if (boxId == null)
throw new NullPointerException("boxId");
if (messageId == null)
throw new NullPointerException("messageId");
if (attachmentId == null)
throw new NullPointerException("attachmentId");
List<NameValuePair> parameters = new ArrayList<NameValuePair>();
parameters.add(new BasicNameValuePair("boxId", boxId));
parameters.add(new BasicNameValuePair("messageId", messageId));
parameters.add(new BasicNameValuePair("attachmentId", attachmentId));
HttpResponse webResponse = ReceivePostHttpResponse("/GenerateSignatureRejectionXml", parameters, signatureRejectionInfo.toByteArray());
return new GeneratedFile(GetHttpResponseFileName(webResponse), GetResponseBytes(webResponse));
}
开发者ID:diadoc,项目名称:diadocsdk-java,代码行数:18,代码来源:DiadocApi.java
示例7: GenerateUniversalTransferDocumentXmlForBuyer
import javax.mail.internet.ParseException; //导入依赖的package包/类
public GeneratedFile GenerateUniversalTransferDocumentXmlForBuyer(
UniversalTransferDocumentInfoProtos.UniversalTransferDocumentBuyerTitleInfo buyerTitleInfo,
String boxId,
String sellerTitleMessageId,
String sellerTitleAttachmentId
) throws IOException, ParseException {
if (buyerTitleInfo == null) throw new NullPointerException("buyerTitleInfo");
if (boxId == null) throw new NullPointerException("boxId");
if (sellerTitleMessageId == null) throw new NullPointerException("sellerTitleMessageId");
if (sellerTitleAttachmentId == null) throw new NullPointerException("sellerTitleAttachmentId");
List<NameValuePair> parameters = new ArrayList<NameValuePair>();
parameters.add(new BasicNameValuePair("boxId", boxId));
parameters.add(new BasicNameValuePair("sellerTitleMessageId", sellerTitleMessageId));
parameters.add(new BasicNameValuePair("sellerTitleAttachmentId", sellerTitleAttachmentId));
HttpResponse httpResponse = ReceivePostHttpResponse("/GenerateUniversalTransferDocumentXmlForBuyer", parameters, buyerTitleInfo.toByteArray());
return new GeneratedFile(GetHttpResponseFileName(httpResponse), GetResponseBytes(httpResponse));
}
开发者ID:diadoc,项目名称:diadocsdk-java,代码行数:18,代码来源:DiadocApi.java
示例8: fromContentDisposition
import javax.mail.internet.ParseException; //导入依赖的package包/类
private static String fromContentDisposition ( final String field )
{
if ( field == null || field.isEmpty () )
{
return null;
}
try
{
final ContentDisposition cd = new ContentDisposition ( field );
return cd.getParameter ( "filename" );
}
catch ( final ParseException e )
{
return null;
}
}
开发者ID:eclipse,项目名称:packagedrone,代码行数:18,代码来源:HttpImporter.java
示例9: processDocument
import javax.mail.internet.ParseException; //导入依赖的package包/类
public OMElement processDocument(Reader reader, String contentType,
MessageContext messageContext) throws AxisFault {
String charset;
try {
ContentType ct = new ContentType(contentType);
charset = ct.getParameter("charset");
} catch (ParseException ex) {
charset = null;
}
if (charset == null) {
charset = MessageContext.DEFAULT_CHAR_SET_ENCODING;
}
messageContext.setProperty(Constants.Configuration.CHARACTER_SET_ENCODING, charset);
return processDocument(new ReaderInputStream(reader, charset), contentType,
messageContext);
}
开发者ID:wso2,项目名称:wso2-axis2-transports,代码行数:17,代码来源:TextMessageBuilderAdapter.java
示例10: isAttachment
import javax.mail.internet.ParseException; //导入依赖的package包/类
@Override
public boolean isAttachment() {
boolean result = false;
String dispositionString = conn.getHeaderField(HEADER_CONTENT_DISPOSITION);
if (dispositionString != null) {
try {
ContentDisposition disposition = new ContentDisposition(dispositionString);
result = disposition.getDisposition().equals(DISPOSITION_ATTACHMENT);
} catch (ParseException e) {
}
}
return result;
}
开发者ID:ITman1,项目名称:ScriptBox,代码行数:17,代码来源:HttpFetchHandler.java
示例11: SoapMimeMultipart
import javax.mail.internet.ParseException; //导入依赖的package包/类
public SoapMimeMultipart (@Nonnull final ESOAPVersion eSOAPVersion,
@Nonnull final Charset aCharset) throws ParseException
{
super ("related");
// type parameter is essential for Axis to work!
// But no charset! RFC 2387, section 3.4 has a special definition
final ContentType aContentType = new ContentType (contentType);
aContentType.setParameter ("type", eSOAPVersion.getMimeType ().getAsString ());
aContentType.setParameter ("charset", aCharset.name ());
contentType = aContentType.toString ();
}
开发者ID:phax,项目名称:ph-as4,代码行数:13,代码来源:SoapMimeMultipart.java
示例12: GenerateTorg12XmlForBuyer
import javax.mail.internet.ParseException; //导入依赖的package包/类
public GeneratedFile GenerateTorg12XmlForBuyer(Torg12InfoProtos.Torg12BuyerTitleInfo buyerTitleInfo, String boxId, String sellerTitleMessageId, String sellerTitleAttachmentId) throws IOException, ParseException {
if (buyerTitleInfo == null) throw new NullPointerException("buyerTitleInfo");
if (boxId == null) throw new NullPointerException("boxId");
if (sellerTitleMessageId == null) throw new NullPointerException("sellerTitleMessageId");
if (sellerTitleAttachmentId == null) throw new NullPointerException("sellerTitleAttachmentId");
List<NameValuePair> parameters = new ArrayList<NameValuePair>();
parameters.add(new BasicNameValuePair("boxId", boxId));
parameters.add(new BasicNameValuePair("sellerTitleMessageId", sellerTitleMessageId));
parameters.add(new BasicNameValuePair("sellerTitleAttachmentId", sellerTitleAttachmentId));
HttpResponse httpResponse = ReceivePostHttpResponse("/GenerateTorg12XmlForBuyer", parameters, buyerTitleInfo.toByteArray());
return new GeneratedFile(GetHttpResponseFileName(httpResponse), GetResponseBytes(httpResponse));
}
开发者ID:diadoc,项目名称:diadocsdk-java,代码行数:13,代码来源:DiadocApi.java
示例13: GenerateTovTorg551XmlForBuyer
import javax.mail.internet.ParseException; //导入依赖的package包/类
public GeneratedFile GenerateTovTorg551XmlForBuyer(TovTorgInfoProtos.TovTorgBuyerTitleInfo buyerTitleInfo, String boxId, String sellerTitleMessageId, String sellerTitleAttachmentId) throws IOException, ParseException {
if (buyerTitleInfo == null) throw new NullPointerException("buyerTitleInfo");
if (boxId == null) throw new NullPointerException("boxId");
if (sellerTitleMessageId == null) throw new NullPointerException("sellerTitleMessageId");
if (sellerTitleAttachmentId == null) throw new NullPointerException("sellerTitleAttachmentId");
List<NameValuePair> parameters = new ArrayList<NameValuePair>();
parameters.add(new BasicNameValuePair("boxId", boxId));
parameters.add(new BasicNameValuePair("sellerTitleMessageId", sellerTitleMessageId));
parameters.add(new BasicNameValuePair("sellerTitleAttachmentId", sellerTitleAttachmentId));
HttpResponse httpResponse = ReceivePostHttpResponse("/GenerateTorg12XmlForBuyer?documentVersion=tovtorg_05_01_02", parameters, buyerTitleInfo.toByteArray());
return new GeneratedFile(GetHttpResponseFileName(httpResponse), GetResponseBytes(httpResponse));
}
开发者ID:diadoc,项目名称:diadocsdk-java,代码行数:13,代码来源:DiadocApi.java
示例14: GenerateAcceptanceCertificateXmlForBuyer
import javax.mail.internet.ParseException; //导入依赖的package包/类
public GeneratedFile GenerateAcceptanceCertificateXmlForBuyer(AcceptanceCertificateInfoProtos.AcceptanceCertificateBuyerTitleInfo buyerTitleInfo, String boxId, String sellerTitleMessageId,
String sellerTitleAttachmentId) throws IOException, ParseException {
if (buyerTitleInfo == null) throw new NullPointerException("buyerTitleInfo");
if (boxId == null) throw new NullPointerException("boxId");
if (sellerTitleMessageId == null) throw new NullPointerException("sellerTitleMessageId");
if (sellerTitleAttachmentId == null) throw new NullPointerException("sellerTitleAttachmentId");
List<NameValuePair> parameters = new ArrayList<NameValuePair>();
parameters.add(new BasicNameValuePair("boxId", boxId));
parameters.add(new BasicNameValuePair("sellerTitleMessageId", sellerTitleMessageId));
parameters.add(new BasicNameValuePair("sellerTitleAttachmentId", sellerTitleAttachmentId));
HttpResponse httpResponse = ReceivePostHttpResponse("/GenerateAcceptanceCertificateXmlForBuyer", parameters, buyerTitleInfo.toByteArray());
return new GeneratedFile(GetHttpResponseFileName(httpResponse), GetResponseBytes(httpResponse));
}
开发者ID:diadoc,项目名称:diadocsdk-java,代码行数:14,代码来源:DiadocApi.java
示例15: GenerateAcceptanceCertificate552XmlForBuyer
import javax.mail.internet.ParseException; //导入依赖的package包/类
public GeneratedFile GenerateAcceptanceCertificate552XmlForBuyer(AcceptanceCertificate552InfoProtos.AcceptanceCertificate552BuyerTitleInfo buyerTitleInfo, String boxId, String sellerTitleMessageId,
String sellerTitleAttachmentId) throws IOException, ParseException {
if (buyerTitleInfo == null) throw new NullPointerException("buyerTitleInfo");
if (boxId == null) throw new NullPointerException("boxId");
if (sellerTitleMessageId == null) throw new NullPointerException("sellerTitleMessageId");
if (sellerTitleAttachmentId == null) throw new NullPointerException("sellerTitleAttachmentId");
List<NameValuePair> parameters = new ArrayList<NameValuePair>();
parameters.add(new BasicNameValuePair("boxId", boxId));
parameters.add(new BasicNameValuePair("sellerTitleMessageId", sellerTitleMessageId));
parameters.add(new BasicNameValuePair("sellerTitleAttachmentId", sellerTitleAttachmentId));
parameters.add(new BasicNameValuePair("documentVersion", "rezru_05_01_01"));
HttpResponse httpResponse = ReceivePostHttpResponse("/GenerateAcceptanceCertificateXmlForBuyer", parameters, buyerTitleInfo.toByteArray());
return new GeneratedFile(GetHttpResponseFileName(httpResponse), GetResponseBytes(httpResponse));
}
开发者ID:diadoc,项目名称:diadocsdk-java,代码行数:15,代码来源:DiadocApi.java
示例16: GenerateUniversalTransferDocumentXmlForSeller
import javax.mail.internet.ParseException; //导入依赖的package包/类
public GeneratedFile GenerateUniversalTransferDocumentXmlForSeller(UniversalTransferDocumentInfoProtos.UniversalTransferDocumentSellerTitleInfo utdInfo, boolean disableValidation) throws IOException, ParseException {
if (utdInfo == null) throw new NullPointerException("info");
HttpResponse httpResponse = ReceivePostHttpResponse(
"/GenerateUniversalTransferDocumentXmlForSeller" + (disableValidation ? "?disableValidation" : ""),
null,
utdInfo.toByteArray());
return new GeneratedFile(GetHttpResponseFileName(httpResponse), GetResponseBytes(httpResponse));
}
开发者ID:diadoc,项目名称:diadocsdk-java,代码行数:9,代码来源:DiadocApi.java
示例17: GenerateUniversalCorrectionTransferDocumentXmlForSeller
import javax.mail.internet.ParseException; //导入依赖的package包/类
public GeneratedFile GenerateUniversalCorrectionTransferDocumentXmlForSeller(UniversalTransferDocumentInfoProtos.UniversalCorrectionDocumentSellerTitleInfo ucdInfo, boolean disableValidation) throws IOException, ParseException {
if (ucdInfo == null) throw new NullPointerException("info");
HttpResponse httpResponse = ReceivePostHttpResponse(
"/GenerateUniversalTransferDocumentXmlForSeller"
+ "?correction"
+ (disableValidation ? "&disableValidation" : ""),
null,
ucdInfo.toByteArray());
return new GeneratedFile(GetHttpResponseFileName(httpResponse), GetResponseBytes(httpResponse));
}
开发者ID:diadoc,项目名称:diadocsdk-java,代码行数:11,代码来源:DiadocApi.java
示例18: GeneratePrintForm
import javax.mail.internet.ParseException; //导入依赖的package包/类
public PrintFormResult GeneratePrintForm(String boxId, String messageId, String documentId) throws IllegalStateException, IOException, ParseException {
if (Tools.IsNullOrEmpty(boxId))
throw new NullPointerException("boxId");
if (Tools.IsNullOrEmpty(messageId))
throw new NullPointerException("messageId");
if (Tools.IsNullOrEmpty(documentId))
throw new NullPointerException("documentId");
List<NameValuePair> parameters = new ArrayList<NameValuePair>();
parameters.add(new BasicNameValuePair("boxId", boxId));
parameters.add(new BasicNameValuePair("messageId", messageId));
parameters.add(new BasicNameValuePair("documentId", documentId));
HttpResponse webResponse = ReceiveGetHttpResponse("/GeneratePrintForm", parameters);
try {
if (webResponse.getStatusLine().getStatusCode() != HttpStatus.SC_OK)
throw new IllegalStateException(webResponse.getStatusLine().toString());
Integer retryAfter = TryGetRetryAfter(webResponse);
if (retryAfter != null)
return new PrintFormResult(retryAfter);
String fileName = GetHttpResponseFileName(webResponse);
byte[] content = GetResponseBytes(webResponse);
String contentType = webResponse.getEntity().getContentType().getValue();
return new PrintFormResult(new PrintFormContent(contentType, fileName, content));
} finally {
webResponse.getEntity().getContent().close();
}
}
开发者ID:diadoc,项目名称:diadocsdk-java,代码行数:31,代码来源:DiadocApi.java
示例19: GenerateDocumentProtocol
import javax.mail.internet.ParseException; //导入依赖的package包/类
public DocumentProtocolResult GenerateDocumentProtocol(String boxId, String messageId, String documentId) throws IllegalStateException, IOException, ParseException {
if (Tools.IsNullOrEmpty(boxId))
throw new NullPointerException("boxId");
if (Tools.IsNullOrEmpty(messageId))
throw new NullPointerException("messageId");
if (Tools.IsNullOrEmpty(documentId))
throw new NullPointerException("documentId");
List<NameValuePair> parameters = new ArrayList<NameValuePair>();
parameters.add(new BasicNameValuePair("boxId", boxId));
parameters.add(new BasicNameValuePair("messageId", messageId));
parameters.add(new BasicNameValuePair("documentId", documentId));
HttpResponse webResponse = ReceiveGetHttpResponse("/GenerateDocumentProtocol", parameters);
try {
if (webResponse.getStatusLine().getStatusCode() != HttpStatus.SC_OK)
throw new IllegalStateException(webResponse.getStatusLine().toString());
Integer retryAfter = TryGetRetryAfter(webResponse);
if (retryAfter != null)
return new DocumentProtocolResult(retryAfter);
byte[] content = GetResponseBytes(webResponse);
return new DocumentProtocolResult(DocumentProtocolProtos.DocumentProtocol.parseFrom(content));
} finally {
webResponse.getEntity().getContent().close();
}
}
开发者ID:diadoc,项目名称:diadocsdk-java,代码行数:29,代码来源:DiadocApi.java
示例20: GenerateDocumentZip
import javax.mail.internet.ParseException; //导入依赖的package包/类
public DocumentZipResult GenerateDocumentZip(String boxId, String messageId, String documentId, Boolean fullDocflow) throws IllegalStateException, IOException, ParseException {
if (Tools.IsNullOrEmpty(boxId))
throw new NullPointerException("boxId");
if (Tools.IsNullOrEmpty(messageId))
throw new NullPointerException("messageId");
if (Tools.IsNullOrEmpty(documentId))
throw new NullPointerException("documentId");
List<NameValuePair> parameters = new ArrayList<NameValuePair>();
parameters.add(new BasicNameValuePair("boxId", boxId));
parameters.add(new BasicNameValuePair("messageId", messageId));
parameters.add(new BasicNameValuePair("documentId", documentId));
parameters.add(new BasicNameValuePair("fullDocflow", fullDocflow.toString()));
HttpResponse webResponse = ReceiveGetHttpResponse("/GenerateDocumentZip", parameters);
try {
if (webResponse.getStatusLine().getStatusCode() != HttpStatus.SC_OK)
throw new IllegalStateException(webResponse.getStatusLine().toString());
Integer retryAfter = TryGetRetryAfter(webResponse);
if (retryAfter != null)
return new DocumentZipResult(retryAfter);
byte[] content = GetResponseBytes(webResponse);
return new DocumentZipResult(DocumentZipProtos.DocumentZipGenerationResult.parseFrom(content));
} finally {
webResponse.getEntity().getContent().close();
}
}
开发者ID:diadoc,项目名称:diadocsdk-java,代码行数:31,代码来源:DiadocApi.java
注:本文中的javax.mail.internet.ParseException类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论