Class IMAPImportHelper


  • public class IMAPImportHelper
    extends Object
    A helper bean with static methods
    Version:
    1.0
    Author:
    rsoika
    • Constructor Detail

      • IMAPImportHelper

        public IMAPImportHelper()
    • Method Detail

      • isMediaTypeOctet

        public static boolean isMediaTypeOctet​(String contentType,
                                               String filename)
        This method returns true if the mediaType of a file attachment is

        "application/octet-stream"

        In some cases we have a situation where the contentType is "application/octet" which is not a valid content type. Also in this case we return true!

        Parameters:
        contentType -
        Returns:
      • readAllBytes

        public static byte[] readAllBytes​(InputStream inputStream)
                                   throws IOException
        Read inputstream into a byte array.
        Parameters:
        inputStream -
        Returns:
        Throws:
        IOException