Class EntityParser
- java.lang.Object
-
- org.apache.camel.component.as2.api.entity.EntityParser
-
public final class EntityParser extends Object
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static byte[]decryptData(byte[] encryptedData, PrivateKey privateKey)static booleanisBoundaryCloseDelimiter(org.apache.http.util.CharArrayBuffer buffer, org.apache.http.message.ParserCursor cursor, String boundary)static booleanisBoundaryDelimiter(org.apache.http.util.CharArrayBuffer buffer, org.apache.http.message.ParserCursor cursor, String boundary)static ApplicationPkcs7MimeCompressedDataEntityparseApplicationPkcs7MimeCompressedDataEntityBody(AS2SessionInputBuffer inbuffer, String boundary, org.apache.http.entity.ContentType contentType, String contentTransferEncoding)static ApplicationPkcs7MimeEnvelopedDataEntityparseApplicationPkcs7MimeEnvelopedDataEntityBody(AS2SessionInputBuffer inbuffer, String boundary, org.apache.http.entity.ContentType contentType, String contentTransferEncoding)static ApplicationPkcs7SignatureEntityparseApplicationPkcs7SignatureEntityBody(AS2SessionInputBuffer inbuffer, String boundary, org.apache.http.entity.ContentType contentType, String contentTransferEncoding)static voidparseAS2MessageEntity(org.apache.http.HttpMessage message)Parses message's entity and replaces it with mime entity.static List<org.apache.http.util.CharArrayBuffer>parseBodyPartFields(AS2SessionInputBuffer inbuffer, String boundary, org.apache.http.message.LineParser parser, List<org.apache.http.util.CharArrayBuffer> fields)static StringparseBodyPartText(AS2SessionInputBuffer inbuffer, String boundary)static MimeEntityparseCompressedEntity(byte[] compressedData, org.bouncycastle.operator.InputExpanderProvider expanderProvider)static ApplicationEDIEntityparseEDIEntityBody(AS2SessionInputBuffer inbuffer, String boundary, org.apache.http.entity.ContentType ediMessageContentType, String contentTransferEncoding, String filename)static MimeEntityparseEntity(byte[] content)static MimeEntityparseEntityBody(AS2SessionInputBuffer inbuffer, String boundary, org.apache.http.entity.ContentType entityContentType, String contentTransferEncoding, String filename, org.apache.http.Header[] headers)static MimeEntityparseEnvelopedEntity(byte[] envelopedContent, PrivateKey privateKey)static AS2MessageDispositionNotificationEntityparseMessageDispositionNotificationEntityBody(AS2SessionInputBuffer inbuffer, String boundary, String charsetName, String contentTransferEncoding)static DispositionNotificationMultipartReportEntityparseMultipartReportEntityBody(AS2SessionInputBuffer inbuffer, String boundary, String charsetName, String contentTransferEncoding)static MultipartSignedEntityparseMultipartSignedEntityBody(AS2SessionInputBuffer inbuffer, String boundary, String micalg, String charsetName, String contentTransferEncoding)static TextPlainEntityparseTextPlainEntityBody(AS2SessionInputBuffer inbuffer, String boundary, String charsetName, String contentTransferEncoding)static voidskipPreambleAndStartBoundary(AS2SessionInputBuffer inbuffer, String boundary)static voidskipToBoundary(AS2SessionInputBuffer inbuffer, String boundary)static byte[]uncompressData(byte[] compressedData, org.bouncycastle.operator.InputExpanderProvider expanderProvider)
-
-
-
Method Detail
-
isBoundaryCloseDelimiter
public static boolean isBoundaryCloseDelimiter(org.apache.http.util.CharArrayBuffer buffer, org.apache.http.message.ParserCursor cursor, String boundary)
-
isBoundaryDelimiter
public static boolean isBoundaryDelimiter(org.apache.http.util.CharArrayBuffer buffer, org.apache.http.message.ParserCursor cursor, String boundary)
-
skipPreambleAndStartBoundary
public static void skipPreambleAndStartBoundary(AS2SessionInputBuffer inbuffer, String boundary) throws org.apache.http.HttpException
- Throws:
org.apache.http.HttpException
-
skipToBoundary
public static void skipToBoundary(AS2SessionInputBuffer inbuffer, String boundary) throws org.apache.http.HttpException
- Throws:
org.apache.http.HttpException
-
parseCompressedEntity
public static MimeEntity parseCompressedEntity(byte[] compressedData, org.bouncycastle.operator.InputExpanderProvider expanderProvider) throws org.apache.http.HttpException
- Throws:
org.apache.http.HttpException
-
parseEnvelopedEntity
public static MimeEntity parseEnvelopedEntity(byte[] envelopedContent, PrivateKey privateKey) throws org.apache.http.HttpException
- Throws:
org.apache.http.HttpException
-
parseEntity
public static MimeEntity parseEntity(byte[] content) throws org.apache.http.HttpException
- Throws:
org.apache.http.HttpException
-
uncompressData
public static byte[] uncompressData(byte[] compressedData, org.bouncycastle.operator.InputExpanderProvider expanderProvider) throws org.apache.http.HttpException- Throws:
org.apache.http.HttpException
-
decryptData
public static byte[] decryptData(byte[] encryptedData, PrivateKey privateKey) throws org.apache.http.HttpException- Throws:
org.apache.http.HttpException
-
parseAS2MessageEntity
public static void parseAS2MessageEntity(org.apache.http.HttpMessage message) throws org.apache.http.HttpExceptionParses message's entity and replaces it with mime entity.- Parameters:
message- - message whose entity is parsed.- Throws:
org.apache.http.HttpException- when things go wrong.
-
parseMultipartSignedEntityBody
public static MultipartSignedEntity parseMultipartSignedEntityBody(AS2SessionInputBuffer inbuffer, String boundary, String micalg, String charsetName, String contentTransferEncoding) throws org.apache.http.ParseException
- Throws:
org.apache.http.ParseException
-
parseMultipartReportEntityBody
public static DispositionNotificationMultipartReportEntity parseMultipartReportEntityBody(AS2SessionInputBuffer inbuffer, String boundary, String charsetName, String contentTransferEncoding) throws org.apache.http.ParseException
- Throws:
org.apache.http.ParseException
-
parseTextPlainEntityBody
public static TextPlainEntity parseTextPlainEntityBody(AS2SessionInputBuffer inbuffer, String boundary, String charsetName, String contentTransferEncoding) throws org.apache.http.ParseException
- Throws:
org.apache.http.ParseException
-
parseMessageDispositionNotificationEntityBody
public static AS2MessageDispositionNotificationEntity parseMessageDispositionNotificationEntityBody(AS2SessionInputBuffer inbuffer, String boundary, String charsetName, String contentTransferEncoding) throws org.apache.http.ParseException
- Throws:
org.apache.http.ParseException
-
parseEntityBody
public static MimeEntity parseEntityBody(AS2SessionInputBuffer inbuffer, String boundary, org.apache.http.entity.ContentType entityContentType, String contentTransferEncoding, String filename, org.apache.http.Header[] headers) throws org.apache.http.ParseException
- Throws:
org.apache.http.ParseException
-
parseEDIEntityBody
public static ApplicationEDIEntity parseEDIEntityBody(AS2SessionInputBuffer inbuffer, String boundary, org.apache.http.entity.ContentType ediMessageContentType, String contentTransferEncoding, String filename) throws org.apache.http.ParseException
- Throws:
org.apache.http.ParseException
-
parseApplicationPkcs7SignatureEntityBody
public static ApplicationPkcs7SignatureEntity parseApplicationPkcs7SignatureEntityBody(AS2SessionInputBuffer inbuffer, String boundary, org.apache.http.entity.ContentType contentType, String contentTransferEncoding) throws org.apache.http.ParseException
- Throws:
org.apache.http.ParseException
-
parseApplicationPkcs7MimeEnvelopedDataEntityBody
public static ApplicationPkcs7MimeEnvelopedDataEntity parseApplicationPkcs7MimeEnvelopedDataEntityBody(AS2SessionInputBuffer inbuffer, String boundary, org.apache.http.entity.ContentType contentType, String contentTransferEncoding) throws org.apache.http.ParseException
- Throws:
org.apache.http.ParseException
-
parseApplicationPkcs7MimeCompressedDataEntityBody
public static ApplicationPkcs7MimeCompressedDataEntity parseApplicationPkcs7MimeCompressedDataEntityBody(AS2SessionInputBuffer inbuffer, String boundary, org.apache.http.entity.ContentType contentType, String contentTransferEncoding) throws org.apache.http.ParseException
- Throws:
org.apache.http.ParseException
-
parseBodyPartText
public static String parseBodyPartText(AS2SessionInputBuffer inbuffer, String boundary) throws IOException
- Throws:
IOException
-
parseBodyPartFields
public static List<org.apache.http.util.CharArrayBuffer> parseBodyPartFields(AS2SessionInputBuffer inbuffer, String boundary, org.apache.http.message.LineParser parser, List<org.apache.http.util.CharArrayBuffer> fields) throws IOException
- Throws:
IOException
-
-