Package org.beanio.stream
Interface RecordWriter
-
- All Known Implementing Classes:
CsvWriter,DelimitedWriter,FixedLengthWriter,JsonWriter,XmlWriter
public interface RecordWriterARecordWriteris used to write records to an output stream. The class used to represent a record is implementation specific and dependent on the format of the output stream. For example, a delimited stream may useString[]objects to define records, while a fixed length based stream may simply useString.- Since:
- 1.0
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidclose()Closes the output stream.voidflush()Flushes the output stream.voidwrite(java.lang.Object record)Writes a record object to this output stream.
-
-
-
Method Detail
-
write
void write(java.lang.Object record) throws java.io.IOExceptionWrites a record object to this output stream.- Parameters:
record- the record object to write- Throws:
java.io.IOException- if an I/O error occurs writing the record to the stream
-
flush
void flush() throws java.io.IOExceptionFlushes the output stream.- Throws:
java.io.IOException- if an I/O error occurs flushing the stream
-
close
void close() throws java.io.IOExceptionCloses the output stream.- Throws:
java.io.IOException- if an I/O error occurs closing the stream
-
-