public class TsvRecordParser extends Object implements RecordParser<TsvTuple>
RecordParser
, serializes and deserializes an
object E to tsv string.RecordParser
,
TsvTuple
Constructor and Description |
---|
TsvRecordParser(String... fields)
Creates a Tsv Record Reader, reading a list of fields separated by the
delimeter symbol.
|
public TsvRecordParser(String... fields)
fields
- the symbolic names of the fields, ordered. Each line will be split
on the delimiter symbol (tab) and each element will be assigned to the corresponding
symbolic namepublic TsvTuple decode(String record)
RecordParser
decode
in interface RecordParser<TsvTuple>
record
- the string containing the serialized objectpublic String encode(TsvTuple tuple)
RecordParser
encode
in interface RecordParser<TsvTuple>
tuple
- the object to serializeCopyright © 2013. All rights reserved.