BeanIO 1.2.3

org.beanio
Interface BeanWriter

All Known Implementing Classes:
AbstractBeanWriter

public interface BeanWriter

Interface for writers capable of writing bean objects to an output stream.

A BeanWriter is created using a StreamFactory and a mapping file.

Since:
1.0
Author:
Kevin Seim
See Also:
StreamFactory

Method Summary
 void close()
          Closes this output stream.
 void flush()
          Flushes this output stream.
 void write(Object bean)
          Writes a Java bean object to this output stream.
 void write(String recordName, Object bean)
          Writes a Java bean object to this output stream.
 

Method Detail

write

void write(Object bean)
           throws BeanWriterException
Writes a Java bean object to this output stream.

Parameters:
bean - the bean object to write
Throws:
BeanWriterException - if an I/O error or other fatal error is caught

write

void write(String recordName,
           Object bean)
           throws BeanWriterException
Writes a Java bean object to this output stream.

Parameters:
recordName - the name of the record definition for formatting the bean object
bean - the bean object to write
Throws:
BeanWriterException - if an I/O error or other fatal error is caught

flush

void flush()
           throws BeanWriterIOException
Flushes this output stream.

Throws:
BeanIOException - if the IOException is thrown when the output stream is flushed
BeanWriterIOException

close

void close()
           throws BeanWriterIOException
Closes this output stream.

Throws:
BeanIOException - if the IOException is thrown when the output stream is closed
BeanWriterIOException

BeanIO 1.2.3

Copyright © 2010-2012 Kevin Seim