|
BeanIO 2.0.4 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.beanio.internal.parser.BeanWriterImpl
public class BeanWriterImpl
A BeanReader implementation.
| Constructor Summary | |
|---|---|
BeanWriterImpl(MarshallingContext context,
Selector layout)
Constructs a new BeanWriterImpl. |
|
| Method Summary | |
|---|---|
void |
close()
Closes this output stream. |
void |
flush()
Flushes this output stream. |
void |
restoreState(String namespace,
Map<String,Object> state)
Restores a Map of previously stored state information. |
void |
updateState(String namespace,
Map<String,Object> state)
Updates a Map with the current state of the Writer to allow for restoration at a later time. |
void |
write(Object bean)
Writes a bean object to this output stream. |
void |
write(String recordName,
Object bean)
Writes a bean object to this output stream. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public BeanWriterImpl(MarshallingContext context,
Selector layout)
context - the MarshallingContextlayout - the root Selector node in the parsing tree| Method Detail |
|---|
public void write(Object bean)
throws BeanWriterException
BeanWriter
write in interface BeanWriterbean - the bean object to write
BeanWriterException - if a record could not be identified for marshalling,
or in a few other rare (but fatal) cases
BeanWriterIOException - if the underlying output stream throws an IOException,
or if this writer is closed
public void write(String recordName,
Object bean)
throws BeanWriterException
BeanWriter
write in interface BeanWriterrecordName - the record or group name bound to the bean object from the mapping filebean - the bean object to write
BeanWriterException - if a record could not be identified for marshalling,
or in a few other rare (but fatal) cases
BeanWriterIOException - if the underlying output stream throws an IOException,
or if this writer is closed
public void flush()
throws BeanWriterIOException
BeanWriter
flush in interface BeanWriterBeanWriterIOException - if the underlying output stream throws an IOException,
or if this writer is closed
public void close()
throws BeanWriterIOException
BeanWriter
close in interface BeanWriterBeanWriterIOException - if the underlying output stream throws an IOException,
or if this writer is already closed
public void updateState(String namespace,
Map<String,Object> state)
StatefulWriter
updateState in interface StatefulWriternamespace - a String to prefix all state keys withstate - the Map to update with the latest state
public void restoreState(String namespace,
Map<String,Object> state)
throws IllegalStateException
StatefulWriter
restoreState in interface StatefulWriternamespace - a String to prefix all state keys withstate - the Map containing the state to restore
IllegalStateException - if the Map is missing any state information
|
BeanIO 2.0.4 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||