Class EnvelopeSerializer
java.lang.Object
com.aquima.interactions.foundation.security.r4.EnvelopeSerializer
Envelope serializer.
- Since:
- 5.1
- Author:
- m.hesselink
-
Method Summary
Modifier and TypeMethodDescriptionstatic void
deserialize
(IEnvelope envelope, InputStream stream) Deserialize an envelope.static IEnvelope
deserializeR12
(byte[] bytes) static IEnvelope
deserializeR6
(InputStream stream) Deserialize an envelope.static void
serialize
(IEnvelope envelope, OutputStream stream, boolean useIndentation) Serialize an envelope.
-
Method Details
-
serialize
Serialize an envelope. The serializer flushes the ouput stream, but does not close the stream after the envelope has been serialized to the output stream- Parameters:
envelope
- envelope containing a message and a signaturestream
- stream to write the envelope touseIndentation
- if set to true, the serialize uses indentation for nested xml tags- Throws:
CryptoGraphicException
- when one or more arguments are not providedCryptoGraphicException
- when the envelope is not a valid R4 envelope
-
deserialize
Deserialize an envelope. The deserializer does not close the input stream- Parameters:
envelope
- A empty release 4 version of the envelopestream
- stream th read the envelope from- Throws:
CryptoGraphicException
- when one or more arguments are not providedCryptoGraphicException
- when the envelope could not be created
-
deserializeR6
Deserialize an envelope. The deserializer does not close the input stream- Parameters:
stream
- stream th read the envelope from- Returns:
- Envelope containing the parsed result from the input stream.
- Throws:
IOException
- when the resource could not be readCryptoGraphicException
- when the envelope could not be created
-
deserializeR12
- Throws:
IOException
-