Search in sources :

Example 1 with DataSetList

use of org.apache.camel.component.flatpack.DataSetList in project camel by apache.

the class FlatpackDataFormat method unmarshal.

public Object unmarshal(Exchange exchange, InputStream stream) throws Exception {
    InputStreamReader reader = new InputStreamReader(stream, IOHelper.getCharsetName(exchange));
    try {
        Parser parser = createParser(exchange, reader);
        DataSet dataSet = parser.parse();
        return new DataSetList(dataSet);
    } finally {
        reader.close();
    }
}
Also used : InputStreamReader(java.io.InputStreamReader) DataSet(net.sf.flatpack.DataSet) DataSetList(org.apache.camel.component.flatpack.DataSetList) Parser(net.sf.flatpack.Parser)

Aggregations

InputStreamReader (java.io.InputStreamReader)1 DataSet (net.sf.flatpack.DataSet)1 Parser (net.sf.flatpack.Parser)1 DataSetList (org.apache.camel.component.flatpack.DataSetList)1