public abstract class Serializer extends Object
| Constructor and Description |
|---|
Serializer() |
| Modifier and Type | Method and Description |
|---|---|
abstract boolean |
canProcess(Object element)
Checks if the serializer implementation can process the element type.
|
abstract void |
process(OutputStream outputStream,
Object element)
Processes the provided element and serializes to output stream.
|
void |
processElement(OutputStream outputStream,
Object element)
Wraps
process(java.io.OutputStream, Object) and calls next serializer in chain. |
void |
setNext(Serializer serializer)
Sets the next serializer in the chain.
|
public void setNext(Serializer serializer)
serializer - the next serializer.public void processElement(OutputStream outputStream, Object element) throws IOException
process(java.io.OutputStream, Object) and calls next serializer in chain.outputStream - the output stream.element - the element to process.IOException - IOException in case of IO error.public abstract boolean canProcess(Object element)
element - the element to process.public abstract void process(OutputStream outputStream, Object element) throws IOException
outputStream - the output stream.element - the element.IOException - In the case of IO error.Copyright © 2018. All rights reserved.