public class ESSLayer
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
protected java.lang.Object |
content_
The content of this ESSLayer.
|
protected jakarta.activation.DataHandler |
dataHandler_
The DataHandler that may wrap the content.
|
static int |
ENVELOPED_DATA
ESSLayer type CMS ENVELOPED_DATA (1).
|
static int |
SIGNED_DATA
ESSLayer type CMS SIGNED_DATA (0).
|
protected int |
type_
The type of this ESS layer, either
SIGNED_DATA (0)
or ENVELOPED_DATA (1) , or -1 (any other type). |
Modifier | Constructor and Description |
---|---|
|
ESSLayer(java.lang.Object content)
Creates an ESSLayer for the given content, which may represent a cryptographically
enhanced S/MIME entity like
SignedContent or
EncryptedContent , or any other type of content. |
protected |
ESSLayer(java.lang.Object content,
int type)
Creates an ESSLayer for the given content of given type.
|
Modifier and Type | Method and Description |
---|---|
java.lang.Object |
getContent()
Gets the content of this ESSLayer.
|
jakarta.activation.DataHandler |
getDataHandler()
Gets the DataHandler that wraps the content of this layer, if set.
|
ESSLayerException |
getException()
Gets the exception that indicates a problem that has occured when parsing
this layer.
|
int |
getType()
Gets the type of this ESS layer, either
SIGNED_DATA (0)
or ENVELOPED_DATA (1) , or -1 (any other type). |
protected void |
setDataHandler(jakarta.activation.DataHandler dataHandler)
Sets the DataHandler that wraps the content of this layer.
|
public static final int SIGNED_DATA
public static final int ENVELOPED_DATA
protected int type_
SIGNED_DATA (0)
or ENVELOPED_DATA (1)
, or -1 (any other type).
This does not represent the content type of the S/MIME message, rather
it maybe used to check whether this layer is cryptographically enhnaced
or not.protected java.lang.Object content_
SignedContent
or EncryptedContent
, or any other MIME entity
(e.g. MimeMultipart, MimeBodyPart) or content represented by an, e.g. InputStream, or String, ... .protected jakarta.activation.DataHandler dataHandler_
public ESSLayer(java.lang.Object content)
SignedContent
or
EncryptedContent
, or any other type of content.content
- the content for this ESSLayerprotected ESSLayer(java.lang.Object content, int type)
SignedContent
or EncryptedContent
, or any other type of
content.content
- the content for this ESSLayertype
- the cryptograhic enhancement type, either SIGNED_DATA (0)
or ENVELOPED_DATA (1)
, or -1 (any other type) of this layerpublic int getType()
SIGNED_DATA (0)
or ENVELOPED_DATA (1)
, or -1 (any other type).
This does not represent the content type of the S/MIME message, rather
it maybe used to check whether this layer is cryptographically enhnaced
or not.SIGNED_DATA (0)
or ENVELOPED_DATA (1)
, or -1 (any other type) of this layerpublic java.lang.Object getContent() throws java.io.IOException
SignedContent
or EncryptedContent
, or any other MIME
entity (e.g. MimeMultipart, MimeBodyPart) or content represented by an, e.g.
InputStream, or String, ... .java.io.IOException
- if an error occurs when accessing the contentpublic jakarta.activation.DataHandler getDataHandler()
null
if there is no DataHandlerprotected void setDataHandler(jakarta.activation.DataHandler dataHandler)
dataHandler
- the DataHandler that wraps the content of this layerpublic ESSLayerException getException()
null
if no problem has occured
when parsing the layer