Package org.xwiki.store.serialization
Class SerializationStreamProvider<R>
- java.lang.Object
-
- org.xwiki.store.serialization.SerializationStreamProvider<R>
-
- Type Parameters:
R
- The class of object which the serializer can serialize (what it requires).
- All Implemented Interfaces:
StreamProvider
public class SerializationStreamProvider<R> extends Object implements StreamProvider
A stream provider which provides a stream from serializing an object.- Since:
- 3.0M3
- Version:
- $Id: e31c365dbc88845238d9b96eda90d6a1deb96212 $
-
-
Constructor Summary
Constructors Constructor Description SerializationStreamProvider(Serializer<R,?> serializer, R toSerialize)
The Constructor.
-
-
-
Constructor Detail
-
SerializationStreamProvider
public SerializationStreamProvider(Serializer<R,?> serializer, R toSerialize)
The Constructor.- Parameters:
serializer
- the serializer for converting the object into a stream of data.toSerialize
- the object to serialize.
-
-
Method Detail
-
getStream
public InputStream getStream() throws IOException
- Specified by:
getStream
in interfaceStreamProvider
- Throws:
IOException
-
-