R- The class of object which the serializer can serialize (what it requires).
P- The class of object which will be provided by this serializer when it parses data.
@ComponentRole public interface Serializer<R,P extends R>
P parse(InputStream stream) throws IOException
stream- an InputStream to parse.
IOException- if the InputStream does not contain the type of object handled by this serializer, the object was serialized with a different Serializer, or something goes wrong along the way.
InputStream serialize(R object) throws IOException
object- the thing to serialize.
IOException- if something goes wrong while serializing.
Copyright © 2004–2021 XWiki. All rights reserved.