public final class TsvParser extends Object implements RecordParser
ValueOption
.
Each method in this class may raise NullPointerException
if parameters were null
.Constructor and Description |
---|
TsvParser(Reader reader)
Creates a new instance.
|
Modifier and Type | Method and Description |
---|---|
void |
close() |
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.
|
public TsvParser(Reader reader) throws IOException
reader
- the source readerIOException
- if failed to initialize the parserIllegalArgumentException
- if the parameter is null
public boolean next() throws RecordFormatException, IOException
RecordParser
RecordFormatException
.next
in interface RecordParser
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 recordpublic void fill(BooleanOption option) throws RecordFormatException, IOException
RecordParser
fill
in interface RecordParser
option
- the target objectRecordFormatException
- if the record format is something wrongIOException
- if error occurred while reading the next cellpublic void fill(ByteOption option) throws RecordFormatException, IOException
RecordParser
fill
in interface RecordParser
option
- the target objectRecordFormatException
- if the record format is something wrongIOException
- if error occurred while reading the next cellpublic void fill(ShortOption option) throws RecordFormatException, IOException
RecordParser
fill
in interface RecordParser
option
- the target objectRecordFormatException
- if the record format is something wrongIOException
- if error occurred while reading the next cellpublic void fill(IntOption option) throws RecordFormatException, IOException
RecordParser
fill
in interface RecordParser
option
- the target objectRecordFormatException
- if the record format is something wrongIOException
- if error occurred while reading the next cellpublic void fill(LongOption option) throws RecordFormatException, IOException
RecordParser
fill
in interface RecordParser
option
- the target objectRecordFormatException
- if the record format is something wrongIOException
- if error occurred while reading the next cellpublic void fill(FloatOption option) throws RecordFormatException, IOException
RecordParser
fill
in interface RecordParser
option
- the target objectRecordFormatException
- if the record format is something wrongIOException
- if error occurred while reading the next cellpublic void fill(DoubleOption option) throws RecordFormatException, IOException
RecordParser
fill
in interface RecordParser
option
- the target objectRecordFormatException
- if the record format is something wrongIOException
- if error occurred while reading the next cellpublic void fill(DecimalOption option) throws RecordFormatException, IOException
RecordParser
fill
in interface RecordParser
option
- the target objectRecordFormatException
- if the record format is something wrongIOException
- if error occurred while reading the next cellpublic void fill(StringOption option) throws RecordFormatException, IOException
RecordParser
fill
in interface RecordParser
option
- the target objectRecordFormatException
- if the record format is something wrongIOException
- if error occurred while reading the next cellpublic void fill(DateOption option) throws RecordFormatException, IOException
RecordParser
0
, this set null
to the target object.fill
in interface RecordParser
option
- the target objectRecordFormatException
- if the record format is something wrongIOException
- if error occurred while reading the next cellpublic void fill(DateTimeOption option) throws RecordFormatException, IOException
RecordParser
0
, this set null
to the target object.fill
in interface RecordParser
option
- the target objectRecordFormatException
- if the record format is something wrongIOException
- if error occurred while reading the next cellpublic void endRecord() throws RecordFormatException, IOException
RecordParser
endRecord
in interface RecordParser
RecordFormatException
- if current record is wrongIOException
- if failed to finalize this recordpublic void close() throws IOException
close
in interface Closeable
close
in interface AutoCloseable
IOException
Copyright © 2011–2019 Asakusa Framework Team. All rights reserved.