org.universAAL.ri.gateway.communicator.service.impl
Enum Serializer
java.lang.Object
java.lang.Enum<Serializer>
org.universAAL.ri.gateway.communicator.service.impl.Serializer
- All Implemented Interfaces:
- Serializable, Comparable<Serializer>
public enum Serializer
- extends Enum<Serializer>
Instance
public static final Serializer Instance
values
public static Serializer[] values()
- Returns an array containing the constants of this enum type, in
the order they are declared. This method may be used to iterate
over the constants as follows:
for (Serializer c : Serializer.values())
System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in
the order they are declared
valueOf
public static Serializer valueOf(String name)
- Returns the enum constant of this type with the specified name.
The string must match exactly an identifier used to declare an
enum constant in this type. (Extraneous whitespace characters are
not permitted.)
- Parameters:
name
- the name of the enum constant to be returned.
- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException
- if this enum type has no constant
with the specified name
NullPointerException
- if the argument is null
marshallObject
public Message marshallObject(Object objectToMarshall)
throws IOException
- Throws:
IOException
unmarshallObject
public <T> T unmarshallObject(Class<T> clazz,
Message message)
throws IOException,
ClassNotFoundException
- Throws:
IOException
ClassNotFoundException
unmarshallObject
public <T> T unmarshallObject(Class<T> clazz,
Object obj,
ClassLoader cl)
throws IOException,
ClassNotFoundException
- Throws:
IOException
ClassNotFoundException
marshall
public Message marshall(Object obj)
unmarshall
public <T> T unmarshall(Class<T> clazz,
Message message)
sendMessageToStream
public static void sendMessageToStream(MessageWrapper wrp,
OutputStream out)
throws IOException,
org.bouncycastle.crypto.CryptoException
- Deserializes the wrapper and sends to a ready stream.
- Parameters:
wrp
- the wrapperout
- the stream
- Throws:
IOException
- io exception
org.bouncycastle.crypto.CryptoException
unmarshalMessage
public static MessageWrapper unmarshalMessage(InputStream is)
throws IOException,
ClassNotFoundException,
org.bouncycastle.crypto.CryptoException
- Reads a message wrapper from a stream.
- Parameters:
is
- input stream to read from a
- Returns:
- a message wrapper
- Throws:
IOException
- io exception
ClassNotFoundException
- deserulization exception
org.bouncycastle.crypto.CryptoException
Copyright © 2014 universAAL Consortium. All Rights Reserved.