public interface BeanWriter extends Debuggable
A BeanWriter is created using a StreamFactory
and
a mapping file.
StreamFactory
Modifier and Type | Method and Description |
---|---|
void |
close()
Closes this output stream.
|
void |
flush()
Flushes this output stream.
|
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.
|
debug, debug
void write(Object bean) throws BeanWriterException, BeanWriterIOException
bean
- the bean object to writeBeanWriterException
- if a record could not be identified for marshalling,
or in a few other rare (but fatal) casesBeanWriterIOException
- if the underlying output stream throws an IOException
,
or if this writer is closedvoid write(String recordName, Object bean) throws BeanWriterException
recordName
- the record or group name bound to the bean object from the mapping filebean
- the bean object to writeBeanWriterException
- if a record could not be identified for marshalling,
or in a few other rare (but fatal) casesBeanWriterIOException
- if the underlying output stream throws an IOException
,
or if this writer is closedvoid flush() throws BeanWriterIOException
BeanWriterIOException
- if the underlying output stream throws an IOException
,
or if this writer is closedvoid close() throws BeanWriterIOException
BeanWriterIOException
- if the underlying output stream throws an IOException
,
or if this writer is already closed