|
Enhydra-Oyster 2.1-7 API | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.enhydra.oyster.util.MimeAssist
MimeAssist contains static methods which help in manipulation and work with mime messages.
Constructor Summary | |
MimeAssist()
|
Method Summary | |
static java.lang.String |
generateID()
Generates value for Content-ID MIME header line which is used in construction of multipart/related type of MimeMessage. |
static byte[] |
getBASE64WithBreak(byte[] b0,
int breakPosition0)
Returns BASE64 encoded byte array with the break at the defined character. |
static byte[] |
getBASE64WithBreak(java.lang.String s0,
int breakPosition0)
Returns BASE64 encoded byte array with the break at the defined character. |
static byte[] |
getBASE64WithBreakOn76(byte[] b0)
Returns BASE64 encoded byte array with the break at the 76th character. |
static byte[] |
getBASE64WithBreakOn76(java.lang.String s0)
Returns BASE64 encoded byte array with the break at the 76th character. |
static javax.activation.MimetypesFileTypeMap |
getFileTypeMap(java.lang.String path0)
Returns object of class MimetypesFileTypeMap generated by using data stored in the given file. |
static java.lang.String |
getMimeTypeFromFileName(java.io.File file0,
java.lang.String mimeFile0)
Returns mime-type for given file name and extension. |
static java.lang.String |
getMimeTypeFromFileName(java.lang.String file0,
java.lang.String mimeFile0)
Returns mime-type for given file name and extension. |
static java.lang.String |
getStringBASE64WithBreak(byte[] b0,
int breakPosition0)
Returns BASE64 encoded String with the break at the defined character. |
static java.lang.String |
getStringBASE64WithBreak(java.lang.String s0,
int breakPosition0)
Returns BASE64 encoded String with the break at the defined character. |
static java.lang.String |
getStringBASE64WithBreakOn76(byte[] b0)
Returns BASE64 encoded String with the break at the 76th character. |
static java.lang.String |
getStringBASE64WithBreakOn76(java.lang.String s0)
Returns BASE64 encoded String with the break at the 76th character. |
static byte[] |
messageConvertor(javax.mail.internet.MimeMessage message0)
Converts email messages, previously composed in Java MimeMessage object, to byte array suitable for later processing within CMS object. |
static java.lang.String |
messageStringConvertor(javax.mail.internet.MimeMessage message0)
Converts email messages, previously composed in Java MimeMessage object, to String suitable for later criptographic processing. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public MimeAssist()
Method Detail |
public static byte[] messageConvertor(javax.mail.internet.MimeMessage message0) throws SMIMEException
message0
- MIME email prepared for sending as MimeMessage
SMIMEException
- if there is no MimeBodyPart in MimeMultipart
message, or in the cases of unrecognisable content of bodypart in MIME
multipart/mixed message or unrecognisable Content-Transfer-Encoding of
message. Also, it can be caused by non SMIMEException which can be one of
the following: MessagingException, IOException or
UnsupportedEncodingException.public static java.lang.String messageStringConvertor(javax.mail.internet.MimeMessage message0) throws SMIMEException
message0
- MIME email prepared for sending as MimeMessage
SMIMEException
- if there is no MimeBodyPart in MimeMultipart
message, or in the cases of unrecognisable content of bodypart in MIME
multipart/mixed message or unrecognisable Content-Transfer-Encoding of
message. Also, it can be caused by non SMIMEException which can be one of
the following: MessagingException or IOException.public static java.lang.String generateID() throws SMIMEException
SMIMEException
- caused by non SMIMEException which is
UnknownHostExceptionpublic static javax.activation.MimetypesFileTypeMap getFileTypeMap(java.lang.String path0) throws SMIMEException
path0
- path and file name of the file which contains desired mime-type
definitions in appropriate format (usually file name is mime.types).
SMIMEException
- caused with non SMIMEException which is IOExceptionpublic static java.lang.String getMimeTypeFromFileName(java.io.File file0, java.lang.String mimeFile0) throws SMIMEException
file0
- is File type object that represents file which mime-type is
looking for.mimeFile0
- path and file name of the file which contains desired mime-type
definitions in appropriate format (usually file name is mime.types).
SMIMEException
- caused with non SMIMEException which is IOExceptionpublic static java.lang.String getMimeTypeFromFileName(java.lang.String file0, java.lang.String mimeFile0) throws SMIMEException
file0
- path and file name of the file which mime-type is looking for.mimeFile0
- path and file name to file which contains desired mime-type
definitions in appropriate format (usually file name is mime.types).
SMIMEException
- caused with non SMIMEException which is IOExceptionpublic static java.lang.String getStringBASE64WithBreakOn76(byte[] b0) throws SMIMEException
b0
- input byte array
SMIMEException
- in case of wrong parameter breakPosition0. Also,
it can be caused by non SMIMEException which can be one of the following:
NoSuchPaddingException, NoSuchProviderException, NoSuchAlgorithmException,
InvalidKeyException, BadPaddingException, IllegalBlockSizeException or
UnsupportedEncodingException.public static byte[] getBASE64WithBreakOn76(byte[] b0) throws SMIMEException
b0
- input byte array
SMIMEException
- in case of wrong parameter breakPosition0. Also,
it can be caused by non SMIMEException which can be one of the following:
NoSuchPaddingException, NoSuchProviderException, NoSuchAlgorithmException,
InvalidKeyException, BadPaddingException, IllegalBlockSizeException or
UnsupportedEncodingException.public static java.lang.String getStringBASE64WithBreakOn76(java.lang.String s0) throws SMIMEException
s0
- input String
SMIMEException
- in case of wrong parameter breakPosition0. Also,
it can be caused by non SMIMEException which can be one of the following:
NoSuchPaddingException, NoSuchProviderException, NoSuchAlgorithmException,
InvalidKeyException, BadPaddingException, IllegalBlockSizeException or
UnsupportedEncodingException.public static byte[] getBASE64WithBreakOn76(java.lang.String s0) throws SMIMEException
s0
- input String
SMIMEException
- in case of wrong parameter breakPosition0. Also,
it can be caused by non SMIMEException which can be one of the following:
NoSuchPaddingException, NoSuchProviderException, NoSuchAlgorithmException,
InvalidKeyException, BadPaddingException, IllegalBlockSizeException or
UnsupportedEncodingException.public static java.lang.String getStringBASE64WithBreak(byte[] b0, int breakPosition0) throws SMIMEException
b0
- input byte arraybreakPosition0
- position for breaking lines in resulted Base64
encoding message content. It should be grather than 0 and less or equal
than 76.
SMIMEException
- in case of wrong parameter breakPosition0. Also,
it can be caused by non SMIMEException which can be one of the following:
NoSuchPaddingException, NoSuchProviderException, NoSuchAlgorithmException,
InvalidKeyException, BadPaddingException, IllegalBlockSizeException or
UnsupportedEncodingException.public static byte[] getBASE64WithBreak(byte[] b0, int breakPosition0) throws SMIMEException
b0
- input byte arraybreakPosition0
- position for breaking lines in resulted Base64
encoding message content. It should be grather than 0 and less or equal
than 76.
SMIMEException
- in case of wrong parameter breakPosition0. Also,
it can be caused by non SMIMEException which can be one of the following:
NoSuchPaddingException, NoSuchProviderException, NoSuchAlgorithmException,
InvalidKeyException, BadPaddingException, IllegalBlockSizeException or
UnsupportedEncodingException.public static java.lang.String getStringBASE64WithBreak(java.lang.String s0, int breakPosition0) throws SMIMEException
s0
- input StringbreakPosition0
- position for breaking lines in resulted Base64
encoding message content. It should be grather than 0 and less or equal
than 76.
SMIMEException
- in case of wrong parameter breakPosition0. Also,
it can be caused by non SMIMEException which can be one of the following:
NoSuchPaddingException, NoSuchProviderException, NoSuchAlgorithmException,
InvalidKeyException, BadPaddingException, IllegalBlockSizeException or
UnsupportedEncodingException.public static byte[] getBASE64WithBreak(java.lang.String s0, int breakPosition0) throws SMIMEException
s0
- input StringbreakPosition0
- position for breaking lines in resulted Base64
encoding message content. It should be grather than 0 and less or equal
than 76.
SMIMEException
- in case of wrong parameter breakPosition0. Also,
it can be caused by non SMIMEException which can be one of the following:
NoSuchPaddingException, NoSuchProviderException, NoSuchAlgorithmException,
InvalidKeyException, BadPaddingException, IllegalBlockSizeException or
UnsupportedEncodingException.
|
Enhydra-Oyster 2.1-7 API | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |