public interface RecordParser extends Closeable
ValueOption
.
SomeModel model = new SomeModel();
try (RecordParser parser = ...) {
while (parser.next()) {
parser.fill(model.getHogeOption());
parser.fill(model.getFooOption());
parser.fill(model.getBarOption());
parser.endRecord();
performSomeAction(model);
}
}
Each method in this interface may raise NullPointerException
if parameters were null
.Modifier and Type | Method and Description |
---|---|
void |
endRecord()
Finalizes current record.
|
void |
fill(BooleanOption option)
Reads the next cell and set the value into the target object.
|
void |
fill(ByteOption option)
Reads the next cell and set the value into the target object.
|
void |
fill(DateOption option)
Reads the next cell and set the value into the target object.
|
void |
fill(DateTimeOption option)
Reads the next cell and set the value into the target object.
|
void |
fill(DecimalOption option)
Reads the next cell and set the value into the target object.
|
void |
fill(DoubleOption option)
Reads the next cell and set the value into the target object.
|
void |
fill(FloatOption option)
Reads the next cell and set the value into the target object.
|
void |
fill(IntOption option)
Reads the next cell and set the value into the target object.
|
void |
fill(LongOption option)
Reads the next cell and set the value into the target object.
|
void |
fill(ShortOption option)
Reads the next cell and set the value into the target object.
|
void |
fill(StringOption option)
Reads the next cell and set the value into the target object.
|
boolean |
next()
Prepare for reading the next record.
|
boolean next() throws RecordFormatException, IOException
RecordFormatException
.true
if the next record exists, or otherwise false
RecordFormatException
- if the record format is something wrongIOException
- if error occurred while reading the head of the next recordvoid fill(BooleanOption option) throws RecordFormatException, IOException
option
- the target objectRecordFormatException
- if the record format is something wrongIOException
- if error occurred while reading the next cellvoid fill(ByteOption option) throws RecordFormatException, IOException
option
- the target objectRecordFormatException
- if the record format is something wrongIOException
- if error occurred while reading the next cellvoid fill(ShortOption option) throws RecordFormatException, IOException
option
- the target objectRecordFormatException
- if the record format is something wrongIOException
- if error occurred while reading the next cellvoid fill(IntOption option) throws RecordFormatException, IOException
option
- the target objectRecordFormatException
- if the record format is something wrongIOException
- if error occurred while reading the next cellvoid fill(LongOption option) throws RecordFormatException, IOException
option
- the target objectRecordFormatException
- if the record format is something wrongIOException
- if error occurred while reading the next cellvoid fill(FloatOption option) throws RecordFormatException, IOException
option
- the target objectRecordFormatException
- if the record format is something wrongIOException
- if error occurred while reading the next cellvoid fill(DoubleOption option) throws RecordFormatException, IOException
option
- the target objectRecordFormatException
- if the record format is something wrongIOException
- if error occurred while reading the next cellvoid fill(DecimalOption option) throws RecordFormatException, IOException
option
- the target objectRecordFormatException
- if the record format is something wrongIOException
- if error occurred while reading the next cellvoid fill(StringOption option) throws RecordFormatException, IOException
option
- the target objectRecordFormatException
- if the record format is something wrongIOException
- if error occurred while reading the next cellvoid fill(DateOption option) throws RecordFormatException, IOException
0
, this set null
to the target object.option
- the target objectRecordFormatException
- if the record format is something wrongIOException
- if error occurred while reading the next cellvoid fill(DateTimeOption option) throws RecordFormatException, IOException
0
, this set null
to the target object.option
- the target objectRecordFormatException
- if the record format is something wrongIOException
- if error occurred while reading the next cellvoid endRecord() throws RecordFormatException, IOException
RecordFormatException
- if current record is wrongIOException
- if failed to finalize this recordCopyright © 2011–2019 Asakusa Framework Team. All rights reserved.