Package org.beanio.stream.delimited
Class DelimitedRecordParser
- java.lang.Object
-
- org.beanio.stream.delimited.DelimitedRecordParser
-
- All Implemented Interfaces:
RecordMarshaller,RecordUnmarshaller
public class DelimitedRecordParser extends java.lang.Object implements RecordUnmarshaller, RecordMarshaller
A combinedRecordMarshallerandRecordUnmarshallerimplementation for delimited formatted records.- Since:
- 2.0
-
-
Constructor Summary
Constructors Constructor Description DelimitedRecordParser()Constructs a newDelimitedRecordParser.DelimitedRecordParser(DelimitedParserConfiguration config)Constructs a newDelimitedRecordParser.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.Stringmarshal(java.lang.Object record)Marshals a single record object to aString.java.lang.Stringmarshal(java.lang.String[] record)Marshals aStringarray into a delimited record.java.lang.String[]unmarshal(java.lang.String text)Unmarshals a single record.
-
-
-
Constructor Detail
-
DelimitedRecordParser
public DelimitedRecordParser()
Constructs a newDelimitedRecordParser.
-
DelimitedRecordParser
public DelimitedRecordParser(DelimitedParserConfiguration config)
Constructs a newDelimitedRecordParser.- Parameters:
config- the parser configuration settings
-
-
Method Detail
-
unmarshal
public java.lang.String[] unmarshal(java.lang.String text)
Description copied from interface:RecordUnmarshallerUnmarshals a single record.- Specified by:
unmarshalin interfaceRecordUnmarshaller- Parameters:
text- the record text to unmarshal- Returns:
- the unmarshalled record object
-
marshal
public java.lang.String marshal(java.lang.Object record)
Description copied from interface:RecordMarshallerMarshals a single record object to aString.- Specified by:
marshalin interfaceRecordMarshaller- Parameters:
record- the record object to marshal- Returns:
- the marshalled record text
-
marshal
public java.lang.String marshal(java.lang.String[] record)
Marshals aStringarray into a delimited record.- Parameters:
record- theString[]to marshal- Returns:
- the formatted record text
-
-