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 boolean
isBoundaryCloseDelimiter(org.apache.http.util.CharArrayBuffer buffer, org.apache.http.message.ParserCursor cursor, String boundary)
static boolean
isBoundaryDelimiter(org.apache.http.util.CharArrayBuffer buffer, org.apache.http.message.ParserCursor cursor, String boundary)
static ApplicationPkcs7MimeCompressedDataEntity
parseApplicationPkcs7MimeCompressedDataEntityBody(AS2SessionInputBuffer inbuffer, String boundary, org.apache.http.entity.ContentType contentType, String contentTransferEncoding)
static ApplicationPkcs7MimeEnvelopedDataEntity
parseApplicationPkcs7MimeEnvelopedDataEntityBody(AS2SessionInputBuffer inbuffer, String boundary, org.apache.http.entity.ContentType contentType, String contentTransferEncoding)
static ApplicationPkcs7SignatureEntity
parseApplicationPkcs7SignatureEntityBody(AS2SessionInputBuffer inbuffer, String boundary, org.apache.http.entity.ContentType contentType, String contentTransferEncoding)
static void
parseAS2MessageEntity(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 String
parseBodyPartText(AS2SessionInputBuffer inbuffer, String boundary)
static MimeEntity
parseCompressedEntity(byte[] compressedData, org.bouncycastle.operator.InputExpanderProvider expanderProvider)
static ApplicationEDIEntity
parseEDIEntityBody(AS2SessionInputBuffer inbuffer, String boundary, org.apache.http.entity.ContentType ediMessageContentType, String contentTransferEncoding)
static MimeEntity
parseEntity(byte[] content)
static MimeEntity
parseEntityBody(AS2SessionInputBuffer inbuffer, String boundary, org.apache.http.entity.ContentType entityContentType, String contentTransferEncoding, org.apache.http.Header[] headers)
static MimeEntity
parseEnvelopedEntity(byte[] envelopedContent, PrivateKey privateKey)
static AS2MessageDispositionNotificationEntity
parseMessageDispositionNotificationEntityBody(AS2SessionInputBuffer inbuffer, String boundary, String charsetName, String contentTransferEncoding)
static DispositionNotificationMultipartReportEntity
parseMultipartReportEntityBody(AS2SessionInputBuffer inbuffer, String boundary, String charsetName, String contentTransferEncoding)
static MultipartSignedEntity
parseMultipartSignedEntityBody(AS2SessionInputBuffer inbuffer, String boundary, String micalg, String charsetName, String contentTransferEncoding)
static TextPlainEntity
parseTextPlainEntityBody(AS2SessionInputBuffer inbuffer, String boundary, String charsetName, String contentTransferEncoding)
static void
skipPreambleAndStartBoundary(AS2SessionInputBuffer inbuffer, String boundary)
static void
skipToBoundary(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.HttpException
Parses 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, 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) 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
-
-