Interface ISerializer


  • public interface ISerializer
    Interface for an object serializer.
    Since:
    5.0.0
    Version:
    $Revision: 10825 $ $Date: 2009-08-04 12:36:40 -0300 (Tue, 04 Aug 2009) $
    See Also:
    ISerializationManager2#serializeObject(Object, lumis.portal.serialization.persistency.IDirectory, String, String, Serializer), ISerializationManager2#deserializeObject(Class, lumis.portal.serialization.persistency.IDirectory, String, String, Serializer, boolean)
    • Method Detail

      • toOutputStream

        void toOutputStream​(Object o,
                            OutputStream outputStream,
                            String alias)
                     throws SerializationException
        Serializes an object to an output stream.
        Parameters:
        object - the object.
        outputStream - the output stream.
        alias - the alias for the object.
        Throws:
        SerializationException - if an error occurred during serialization.
        Since:
        5.0.0
      • fromInputStream

        <T> T fromInputStream​(Class<T> objectClass,
                              String alias,
                              InputStream inputStream)
                       throws SerializationException
        Deserializes an object from an input stream.
        Type Parameters:
        T - the object type.
        Parameters:
        objectClass - the object type class.
        alias - the object alias.
        inputStream - the input stream.
        Returns:
        the deserialized object.
        Throws:
        SerializationException - if an error occurred during deserialization.
        Since:
        5.0.0