Class EntityParser


  • public final class EntityParser
    extends Object
    • 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.
      • 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
      • 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