public interface RecordEmitter extends Flushable, Closeable
ValueOption instances as set of records format.
Iterator<SomeModel> models = ...;
try (RecordEmitter emitter = ...) {
while (models.hasNext()) {
SomeModel model = models.next();
emitter.emit(model.getHogeOption());
emitter.emit(model.getFooOption());
emitter.emit(model.getBarOption());
emitter.endRecord();
}
}
Each method in this interface may raise NullPointerException if parameters were null.| Modifier and Type | Method and Description |
|---|---|
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 endRecord()
throws IOException
IOException - if error occurred while writing the valuevoid emit(BooleanOption option) throws IOException
option - the target value to be writtenIOException - if error occurred while writing the valuevoid emit(ByteOption option) throws IOException
option - the target value to be writtenIOException - if error occurred while writing the valuevoid emit(ShortOption option) throws IOException
option - the target value to be writtenIOException - if error occurred while writing the valuevoid emit(IntOption option) throws IOException
option - the target value to be writtenIOException - if error occurred while writing the valuevoid emit(LongOption option) throws IOException
option - the target value to be writtenIOException - if error occurred while writing the valuevoid emit(FloatOption option) throws IOException
option - the target value to be writtenIOException - if error occurred while writing the valuevoid emit(DoubleOption option) throws IOException
option - the target value to be writtenIOException - if error occurred while writing the valuevoid emit(DecimalOption option) throws IOException
option - the target value to be writtenIOException - if error occurred while writing the valuevoid emit(StringOption option) throws IOException
option - the target value to be writtenIOException - if error occurred while writing the valuevoid emit(DateOption option) throws IOException
option - the target value to be writtenIOException - if error occurred while writing the valuevoid emit(DateTimeOption option) throws IOException
option - the target value to be writtenIOException - if error occurred while writing the valueCopyright © 2011–2018 Asakusa Framework Team. All rights reserved.