iaik.smime.ess.utils
Class ESSLayers

java.lang.Object
  extended by iaik.smime.ess.utils.ESSLayers

public class ESSLayers
extends java.lang.Object

ESSLayer container. Holds several layers a message may consist of. Maybe created by calling method resolve of an ESS mailing list agent:

 MLA mla = ...;
 ...
 // the message to process:
 MimeMessage msg = ...;
 // resolve the message into its layers:
 ESSLayers layers = mla.resolve(msg);
 

See Also:
ESSLayer, SignedESSLayer, EnvelopedESSLayer, MLA

Method Summary
 ESSLayer[] getAllLayers()
          Gets all layers currently held by this MLA.
 int getIndexOfEnvelopedLayer()
          Get the index of the (outermost) EnvelopedData layer, if present.
 int getIndexOfInnerSignedLayer()
          Get the index of the inner SignedData layer, if present.
 int getIndexOfOuterSignedLayer()
          Get the index of the outer SignedData layer, if present.
 ESSLayer getInnermostLayer()
          Gets the innermost layer.
 ESSLayer getLayerAtIndex(int index)
          Gets the layer at the requested index.
 int getNumberOfLayers()
          Get the number of layers included in this container.
 ESSLayer getOutermostLayer()
          Gets the outermost layer.
 java.lang.String toString()
          Returns a String representation of this MLA.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Method Detail

getNumberOfLayers

public int getNumberOfLayers()
Get the number of layers included in this container.

Returns:
the number of layers included in this container

getOutermostLayer

public ESSLayer getOutermostLayer()
Gets the outermost layer.

Returns:
the outermost layer

getInnermostLayer

public ESSLayer getInnermostLayer()
Gets the innermost layer.

Returns:
the innermost layer

getIndexOfOuterSignedLayer

public int getIndexOfOuterSignedLayer()
Get the index of the outer SignedData layer, if present.

Returns:
the index of the outer SignedData layer, or -1 if no outer SignedData layer is included

getIndexOfInnerSignedLayer

public int getIndexOfInnerSignedLayer()
Get the index of the inner SignedData layer, if present.

Returns:
the index of the inner SignedData layer, or -1 if no inner SignedData layer is included

getIndexOfEnvelopedLayer

public int getIndexOfEnvelopedLayer()
Get the index of the (outermost) EnvelopedData layer, if present.

Returns:
the index of the (outermost) EnvelopedData layer, or -1 if no inner EnvelopedData layer is included

getLayerAtIndex

public ESSLayer getLayerAtIndex(int index)
Gets the layer at the requested index.

Returns:
the layer at the given index
Throws:
java.lang.ArrayIndexOutOfBoundsException - if the index is out of range

getAllLayers

public ESSLayer[] getAllLayers()
Gets all layers currently held by this MLA.

Returns:
an array holding all the included layers (the outermost layer is located at index 0, the innermost layer at index n-1)

toString

public java.lang.String toString()
Returns a String representation of this MLA.

Overrides:
toString in class java.lang.Object
Returns:
a string representation of the MLA

This Javadoc may contain text parts from text parts from IETF Internet Standard specifications (see copyright note).

IAIK-CMS 6.0, (c) 2002 IAIK, (c) 2003, 2023 SIC