T - the object typepublic class DefaultSerialization<T> extends Object implements Serialization<T>
Serialization using the built-in Java serialization facility.
 Clients can inherit this class.Serializable| Modifier and Type | Class and Description | 
|---|---|
| static class  | DefaultSerialization.ObjectSink<T>An  ObjectOutputadapter implementation ofSink. | 
| static class  | DefaultSerialization.ObjectSource<T>An  ObjectInputadapter implementation ofSource. | 
| Constructor and Description | 
|---|
| DefaultSerialization() | 
| Modifier and Type | Method and Description | 
|---|---|
| protected ObjectInput | createObjectInput(InputStream stream)Creates an  ObjectInputobject from theInputStream. | 
| protected ObjectOutput | createObjectOutput(OutputStream stream)Creates an  ObjectOutputobject from theOutputStream. | 
| Sink<T> | createSink(OutputStream stream)Creates a new  Sinkusing theOutputStream. | 
| Source<T> | createSource(InputStream stream)Creates a new  Sourceusing theInputStream. | 
public Source<T> createSource(InputStream stream) throws IOException, InterruptedException
SerializationSource using the InputStream.createSource in interface Serialization<T>stream - the InputStream which contains serialized formSourceIOException - if failed to create a source by I/O errorInterruptedException - if interrupted while preparing the sourcepublic Sink<T> createSink(OutputStream stream) throws IOException, InterruptedException
SerializationSink using the OutputStream.createSink in interface Serialization<T>stream - the OutputStream which contains serialized formSinkIOException - if failed to create a sink by I/O errorInterruptedException - if interrupted while preparing the sinkprotected ObjectInput createObjectInput(InputStream stream) throws IOException, InterruptedException
stream - the source InputStreamObjectInput which takes objects from the sourceIOException - if failed to create ObjectInput by I/O errorInterruptedException - if interrupted while preparing ObjectInputprotected ObjectOutput createObjectOutput(OutputStream stream) throws IOException, InterruptedException
ObjectOutput object from the OutputStream.
 This implementation returns ObjectOutputStream.stream - the target OutputStreamObjectOutput which puts objects into the targetIOException - if failed to create ObjectOutput by I/O errorInterruptedException - if interrupted while preparing ObjectOutputCopyright © 2011–2019 Asakusa Framework Team. All rights reserved.