public class CsvEmitter extends Object implements RecordEmitter
Constructor and Description |
---|
CsvEmitter(OutputStream stream,
String path,
CsvConfiguration config)
Creates a new instance.
|
Modifier and Type | Method and Description |
---|---|
void |
close() |
void |
emit(BooleanOption option)
Writes the value as the next cell on in current record.
|
void |
emit(ByteOption option)
Writes the value as the next cell on in current record.
|
void |
emit(DateOption option)
Writes the value as the next cell on in current record.
|
void |
emit(DateTimeOption option)
Writes the value as the next cell on in current record.
|
void |
emit(DecimalOption option)
Writes the value as the next cell on in current record.
|
void |
emit(DoubleOption option)
Writes the value as the next cell on in current record.
|
void |
emit(FloatOption option)
Writes the value as the next cell on in current record.
|
void |
emit(IntOption option)
Writes the value as the next cell on in current record.
|
void |
emit(LongOption option)
Writes the value as the next cell on in current record.
|
void |
emit(ShortOption option)
Writes the value as the next cell on in current record.
|
void |
emit(StringOption option)
Writes the value as the next cell on in current record.
|
void |
endRecord()
Finalizes the current record and prepares writing the next record.
|
void |
flush() |
public CsvEmitter(OutputStream stream, String path, CsvConfiguration config)
stream
- the target streampath
- the destination pathconfig
- current configurationIllegalArgumentException
- if some parameters were null
public void emit(BooleanOption option) throws IOException
RecordEmitter
emit
in interface RecordEmitter
option
- the target value to be writtenIOException
- if error occurred while writing the valuepublic void emit(ByteOption option) throws IOException
RecordEmitter
emit
in interface RecordEmitter
option
- the target value to be writtenIOException
- if error occurred while writing the valuepublic void emit(ShortOption option) throws IOException
RecordEmitter
emit
in interface RecordEmitter
option
- the target value to be writtenIOException
- if error occurred while writing the valuepublic void emit(IntOption option) throws IOException
RecordEmitter
emit
in interface RecordEmitter
option
- the target value to be writtenIOException
- if error occurred while writing the valuepublic void emit(LongOption option) throws IOException
RecordEmitter
emit
in interface RecordEmitter
option
- the target value to be writtenIOException
- if error occurred while writing the valuepublic void emit(FloatOption option) throws IOException
RecordEmitter
emit
in interface RecordEmitter
option
- the target value to be writtenIOException
- if error occurred while writing the valuepublic void emit(DoubleOption option) throws IOException
RecordEmitter
emit
in interface RecordEmitter
option
- the target value to be writtenIOException
- if error occurred while writing the valuepublic void emit(DecimalOption option) throws IOException
RecordEmitter
emit
in interface RecordEmitter
option
- the target value to be writtenIOException
- if error occurred while writing the valuepublic void emit(StringOption option) throws IOException
RecordEmitter
emit
in interface RecordEmitter
option
- the target value to be writtenIOException
- if error occurred while writing the valuepublic void emit(DateOption option) throws IOException
RecordEmitter
emit
in interface RecordEmitter
option
- the target value to be writtenIOException
- if error occurred while writing the valuepublic void emit(DateTimeOption option) throws IOException
RecordEmitter
emit
in interface RecordEmitter
option
- the target value to be writtenIOException
- if error occurred while writing the valuepublic void endRecord() throws IOException
RecordEmitter
endRecord
in interface RecordEmitter
IOException
- if error occurred while writing the valuepublic void flush() throws IOException
flush
in interface Flushable
IOException
public void close() throws IOException
close
in interface Closeable
close
in interface AutoCloseable
IOException
Copyright © 2011–2019 Asakusa Framework Team. All rights reserved.