|
Oracle Security Developer Tools S/MIME Java API Reference 10g (10.1.4.0.1) B28172-01 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object
oracle.security.crypto.smime.SmimeUtils
Smime Utility functions.
Constructor Summary | |
SmimeUtils() |
Method Summary | |
static void |
canonicalize(javax.mail.internet.MimePart mp) Applies MIME content canonicalization, recursively, to the given MimePart . |
static javax.activation.FileDataSource |
createFileDataSource(java.io.File file, java.lang.String contentTypeHeader) Creates an instance of javax.activation.FileDataSource . |
static javax.activation.FileDataSource |
createFileDataSource(java.lang.String name, java.lang.String contentTypeHeader) Creates an instance of javax.activation.FileDataSource . |
static byte[] |
toBytes(javax.mail.internet.MimeBodyPart bodyPart) Convert a MimeBodyPart to a byte array. |
static byte[] |
toBytes(javax.mail.internet.MimeBodyPart bodyPart, int length) Convert a MimeBodyPart to a byte array. |
static void |
updateHeaders(javax.mail.internet.MimeBodyPart bodyPart) Deprecated. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public SmimeUtils()
Method Detail |
public static void updateHeaders(javax.mail.internet.MimeBodyPart bodyPart) throws javax.mail.MessagingException
javax.mail.MessagingException
public static byte[] toBytes(javax.mail.internet.MimeBodyPart bodyPart) throws javax.mail.MessagingException, java.io.IOException
bodyPart
- The content.javax.mail.MessagingException
- An error occurred while canonicalizing the content.java.io.IOException
- An I/O error occurred.public static byte[] toBytes(javax.mail.internet.MimeBodyPart bodyPart, int length) throws javax.mail.MessagingException, java.io.IOException
bodyPart
- The content.length
- The content Length.javax.mail.MessagingException
- An error occurred while canonicalizing the content.java.io.IOException
- An I/O error occurred.public static javax.activation.FileDataSource createFileDataSource(java.io.File file, java.lang.String contentTypeHeader)
javax.activation.FileDataSource
.
Use this method rather than directly instantiating a FileDataSource
if transparent handling of multipart or multipart/signed S/MIME types is desired. (The default FileDataSource
included with JAF 1.0.1 does not handle multipart MIME boundaries when used with Javamail 1.1.3.)
file
- The file from which to create this data source.contentTypeHeader
- The content type MIME header string (may be null
).FileDataSource
.public static javax.activation.FileDataSource createFileDataSource(java.lang.String name, java.lang.String contentTypeHeader)
javax.activation.FileDataSource
.
Use this method rather than directly instantiating a FileDataSource
if transparent handling of multipart or multipart/signed S/MIME types is desired. (The default FileDataSource
included with JAF 1.0.1 does not handle multipart MIME boundaries when used with Javamail 1.1.3.)
name
- The name of the file from which to create this data source.contentTypeHeader
- The content type MIME header string (may be null
).FileDataSource
.public static void canonicalize(javax.mail.internet.MimePart mp) throws javax.mail.MessagingException
MimePart
. Currently canonicalizes only content with top-level content type of "text"
.javax.mail.MessagingException
|
Oracle Security Developer Tools S/MIME Java API Reference 10g (10.1.4.0.1) B28172-01 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |