com.ibm.security.smime.jmail
Class PKCS10MimeHandler
com.ibm.security.smime.jmail.PKCS10MimeHandler
- public class PKCS10MimeHandler
The PKCS10MimeHandler class extends the capabilities of the DataHandler's
implementation in support of the PKCS10MimeDataSource object.
- See Also:
PKCS10MimeDataSource
,
CertificationRequest
PKCS10MimeHandler
public PKCS10MimeHandler()
PKCS10MimeHandler
public PKCS10MimeHandler(String provider)
getContent
public Object getContent(DataSource ds)
throws IOException
- Return the CertificationRequest object contained within the DataSource.
- Parameters:
ds
- DataSource PKCS10MimeDataSource- Returns:
- Object CertificationRequest or null.
getTransferDataFlavors
public DataFlavor[] getTransferDataFlavors()
- Returns an array of DataFlavor objects indicating the flavors the data can be
provided in. The supported mimetype is "application/x-pkcs10".
- Returns:
- Array of DataFlavor objects.
getTransferData
public Object getTransferData(DataFlavor df,
DataSource ds)
throws UnsupportedFlavorException,
IOException
- Returns a CertificationRequest object which represents the data to be transferred.
The DataFlavor mimetype must be one of the supported mimetypes.
- Parameters:
df
- DataFlavor with a supported mimetypeds
- DataSource of type PKCS10MimeDataSource- Returns:
- CertificationRequest or null
writeTo
public void writeTo(Object obj,
String mimeType,
OutputStream os)
throws IOException
- Convert the CertificationRequest object to a DER-encoded byte stream
of the supported MIME type and write it to the output stream.
- Parameters:
obj
- CertificationRequestmimeType
- mimeTypeos
- OutputStream
toString
public String toString()
- Returns a string representation of this PKCS10MimeHandler object.
- Returns:
- a string representation of this object.