Class EntityParser

java.lang.Object
org.apache.camel.component.as2.api.entity.EntityParser

public final class EntityParser extends Object
  • Method Details

    • isBoundaryCloseDelimiter

      public static boolean isBoundaryCloseDelimiter(org.apache.hc.core5.util.CharArrayBuffer buffer, org.apache.hc.core5.http.message.ParserCursor cursor, String boundary)
    • isBoundaryDelimiter

      public static boolean isBoundaryDelimiter(org.apache.hc.core5.util.CharArrayBuffer buffer, org.apache.hc.core5.http.message.ParserCursor cursor, String boundary)
    • skipPreambleAndStartBoundary

      public static void skipPreambleAndStartBoundary(AS2SessionInputBuffer inbuffer, InputStream is, String boundary) throws org.apache.hc.core5.http.HttpException
      Throws:
      org.apache.hc.core5.http.HttpException
    • skipToBoundary

      public static void skipToBoundary(AS2SessionInputBuffer inbuffer, InputStream is, String boundary) throws org.apache.hc.core5.http.HttpException
      Throws:
      org.apache.hc.core5.http.HttpException
    • parseCompressedEntity

      public static MimeEntity parseCompressedEntity(byte[] compressedData, org.bouncycastle.operator.InputExpanderProvider expanderProvider) throws org.apache.hc.core5.http.HttpException
      Throws:
      org.apache.hc.core5.http.HttpException
    • parseEnvelopedEntity

      public static MimeEntity parseEnvelopedEntity(byte[] envelopedContent, PrivateKey privateKey) throws org.apache.hc.core5.http.HttpException
      Throws:
      org.apache.hc.core5.http.HttpException
    • parseEntity

      public static MimeEntity parseEntity(byte[] content) throws org.apache.hc.core5.http.HttpException
      Throws:
      org.apache.hc.core5.http.HttpException
    • uncompressData

      public static byte[] uncompressData(byte[] compressedData, org.bouncycastle.operator.InputExpanderProvider expanderProvider) throws org.apache.hc.core5.http.HttpException
      Throws:
      org.apache.hc.core5.http.HttpException
    • decryptData

      public static byte[] decryptData(byte[] encryptedData, PrivateKey privateKey) throws org.apache.hc.core5.http.HttpException
      Throws:
      org.apache.hc.core5.http.HttpException
    • parseAS2MessageEntity

      public static void parseAS2MessageEntity(org.apache.hc.core5.http.HttpMessage message) throws org.apache.hc.core5.http.HttpException
      Parses message's entity and replaces it with mime entity.
      Parameters:
      message - - message whose entity is parsed.
      Throws:
      org.apache.hc.core5.http.HttpException - when things go wrong.
    • parseMultipartSignedEntityBody

      public static MultipartSignedEntity parseMultipartSignedEntityBody(AS2SessionInputBuffer inbuffer, InputStream is, String boundary, String micalg, String charsetName, String contentTransferEncoding) throws org.apache.hc.core5.http.ParseException
      Throws:
      org.apache.hc.core5.http.ParseException
    • parseMultipartReportEntityBody

      public static DispositionNotificationMultipartReportEntity parseMultipartReportEntityBody(AS2SessionInputBuffer inbuffer, InputStream is, String boundary, String charsetName, String contentTransferEncoding) throws org.apache.hc.core5.http.ParseException
      Throws:
      org.apache.hc.core5.http.ParseException
    • parseTextPlainEntityBody

      public static TextPlainEntity parseTextPlainEntityBody(AS2SessionInputBuffer inbuffer, InputStream is, String boundary, String charsetName, String contentTransferEncoding) throws org.apache.hc.core5.http.ParseException
      Throws:
      org.apache.hc.core5.http.ParseException
    • parseMessageDispositionNotificationEntityBody

      public static AS2MessageDispositionNotificationEntity parseMessageDispositionNotificationEntityBody(AS2SessionInputBuffer inbuffer, InputStream is, String boundary, String charsetName) throws org.apache.hc.core5.http.ParseException
      Throws:
      org.apache.hc.core5.http.ParseException
    • parseEntityBody

      public static MimeEntity parseEntityBody(AS2SessionInputBuffer inbuffer, InputStream is, String boundary, org.apache.hc.core5.http.ContentType entityContentType, String contentTransferEncoding, String filename, org.apache.hc.core5.http.Header[] headers) throws org.apache.hc.core5.http.ParseException
      Throws:
      org.apache.hc.core5.http.ParseException
    • parseEDIEntityBody

      public static ApplicationEntity parseEDIEntityBody(AS2SessionInputBuffer inbuffer, InputStream is, String boundary, org.apache.hc.core5.http.ContentType ediMessageContentType, String contentTransferEncoding, String filename) throws org.apache.hc.core5.http.ParseException
      Throws:
      org.apache.hc.core5.http.ParseException
    • parseApplicationPkcs7SignatureEntityBody

      public static ApplicationPkcs7SignatureEntity parseApplicationPkcs7SignatureEntityBody(AS2SessionInputBuffer inbuffer, InputStream is, String boundary, org.apache.hc.core5.http.ContentType contentType, String contentTransferEncoding) throws org.apache.hc.core5.http.ParseException
      Throws:
      org.apache.hc.core5.http.ParseException
    • parseApplicationPkcs7MimeEnvelopedDataEntityBody

      public static ApplicationPkcs7MimeEnvelopedDataEntity parseApplicationPkcs7MimeEnvelopedDataEntityBody(AS2SessionInputBuffer inbuffer, InputStream is, String boundary, org.apache.hc.core5.http.ContentType contentType, String contentTransferEncoding) throws org.apache.hc.core5.http.ParseException
      Throws:
      org.apache.hc.core5.http.ParseException
    • parseApplicationPkcs7MimeCompressedDataEntityBody

      public static ApplicationPkcs7MimeCompressedDataEntity parseApplicationPkcs7MimeCompressedDataEntityBody(AS2SessionInputBuffer inbuffer, InputStream is, String boundary, org.apache.hc.core5.http.ContentType contentType, String contentTransferEncoding) throws org.apache.hc.core5.http.ParseException
      Throws:
      org.apache.hc.core5.http.ParseException
    • parseBodyPartBytes

      public static byte[] parseBodyPartBytes(AS2SessionInputBuffer inbuffer, InputStream is, String boundary, org.apache.hc.core5.http.ContentType contentType, String contentTransferEncoding) throws IOException, org.apache.camel.CamelException, org.apache.commons.codec.DecoderException
      Throws:
      IOException
      org.apache.camel.CamelException
      org.apache.commons.codec.DecoderException
    • parseBodyPartText

      public static String parseBodyPartText(AS2SessionInputBuffer inbuffer, InputStream is, String boundary) throws IOException
      Throws:
      IOException
    • parseBodyPartFields

      public static List<org.apache.hc.core5.util.CharArrayBuffer> parseBodyPartFields(AS2SessionInputBuffer inbuffer, InputStream is, String boundary, org.apache.hc.core5.http.message.LineParser parser, List<org.apache.hc.core5.util.CharArrayBuffer> fields) throws IOException
      Throws:
      IOException