|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectbiz.c24.io.api.presentation.Sink
biz.c24.io.api.presentation.JavaClassSink
public class JavaClassSink
A sink for generating java class instances from data objects.
Note that this implementation is not synchronized. If multiple threads use an instance concurrently, it must be synchronized externally.
Sink
,
Serialized FormConstructor Summary | |
---|---|
JavaClassSink()
Constructs a new instance. |
|
JavaClassSink(JavaClassSink clone)
Constructs a new instance cloned from clone . |
|
JavaClassSink(OutputStream stream)
Constructs a new instance which will write to stream . |
Method Summary | |
---|---|
Object |
clone()
|
Object |
convertObject(ComplexDataObject cdo)
Converts the specified object back to its original form, skipping the serialization and streaming steps. |
Class |
getRootClass()
Returns the root class. |
void |
setRootClass(Class rootClazz)
Sets the root class. |
void |
setWriter(Writer writer)
Sets the writer (optional operation). |
void |
writeObject(ComplexDataObject obj)
Writes an object to the writer or output stream that has been set. |
Methods inherited from class biz.c24.io.api.presentation.Sink |
---|
checkInit, clearBatchIterators, getEncoding, getOutputStream, getWriter, registerBatchIterator, setEncoding, setOutputStream, stream, unregisterBatchIterator, writer |
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public JavaClassSink()
public JavaClassSink(JavaClassSink clone)
clone
.
clone
- The instance to clone.public JavaClassSink(OutputStream stream)
stream
.
stream
- The stream to write the java class instances to.Method Detail |
---|
public Class getRootClass()
public void setRootClass(Class rootClazz)
rootClazz
- The root class.public void setWriter(Writer writer)
Sink
setWriter
in class Sink
writer
- The new value.public void writeObject(ComplexDataObject obj) throws IOException
Sink
writeObject
in class Sink
obj
- The object to be written.
IOException
- If the complete object could not be written for any reason.public Object convertObject(ComplexDataObject cdo) throws IOException
cdo
- The object to be written.
IOException
- If the complete object could not be written for any reason.
IllegalStateException
- If neither a writer nor an output stream has been set.public Object clone()
clone
in class Sink
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |