Package org.imixs.archive.importer.mail
Class IMAPImportHelper
- java.lang.Object
-
- org.imixs.archive.importer.mail.IMAPImportHelper
-
public class IMAPImportHelper extends Object
A helper bean with static methods- Version:
- 1.0
- Author:
- rsoika
-
-
Constructor Summary
Constructors Constructor Description IMAPImportHelper()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static booleanisMediaTypeOctet(String contentType, String filename)This method returns true if the mediaType of a file attachment isstatic byte[]readAllBytes(InputStream inputStream)Read inputstream into a byte array.
-
-
-
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
-
-