public class FixedLengthWriter extends Object implements RecordWriter
String
class.Constructor and Description |
---|
FixedLengthWriter(Writer out)
Constructs a new FixedLegthWriter.
|
FixedLengthWriter(Writer out,
String recordTerminator)
Constructs a new FixedLegthWriter.
|
Modifier and Type | Method and Description |
---|---|
void |
close()
Closes the output stream.
|
void |
flush()
Flushes the output stream.
|
void |
write(Object value)
Writes a record object to this output stream.
|
public FixedLengthWriter(Writer out)
out
- the output stream to write topublic void write(Object value) throws IOException, RecordIOException
RecordWriter
write
in interface RecordWriter
value
- the record object to writeIOException
- if an I/O error occurs writing the record to the streamRecordIOException
public void flush() throws IOException
RecordWriter
flush
in interface RecordWriter
IOException
- if an I/O error occurs flushing the streampublic void close() throws IOException
RecordWriter
close
in interface RecordWriter
IOException
- if an I/O error occurs closing the stream