Package net.sf.flatpack

Examples of net.sf.flatpack.DataSet


    public Object unmarshal(Exchange exchange, InputStream stream) throws Exception {
        InputStreamReader reader = new InputStreamReader(stream);
        try {
            Parser parser = createParser(exchange, reader);
            DataSet dataSet = parser.parse();
            return new DataSetList(dataSet);
        } finally {
            reader.close();
        }
    }
View Full Code Here


        this.endpoint = endpoint;
    }

    public void process(Exchange exchange) throws Exception {
        Parser parser = endpoint.createParser(exchange);
        DataSet dataSet = parser.parse();

        if (endpoint.isSplitRows()) {
            int counter = 0;
            while (dataSet.next()) {
                endpoint.processDataSet(dataSet, counter++);
            }
        } else {
            endpoint.processDataSet(dataSet, dataSet.getRowCount());
        }
    }
View Full Code Here

    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();
        }
    }
View Full Code Here

    }

    @SuppressWarnings("unchecked")
    public void process(Exchange exchange) throws Exception {
        Parser parser = endpoint.createParser(exchange);
        DataSet dataSet = parser.parse();

        if (dataSet.getErrorCount() > 0) {
            StringBuilder sb = new StringBuilder();
            sb.append(String.format("Flatpack has found %s errors while parsing", dataSet.getErrorCount()));
            throw new FlatpackException(sb.toString(), exchange, dataSet.getErrors());
        }

        if (endpoint.isSplitRows()) {
            int counter = 0;
            while (dataSet.next()) {
                endpoint.processDataSet(exchange, dataSet, counter++);
            }
        } else {
            endpoint.processDataSet(exchange, dataSet, dataSet.getRowCount());
        }
    }
View Full Code Here

        this.endpoint = endpoint;
    }

    public void process(Exchange exchange) throws Exception {
        Parser parser = endpoint.createParser(exchange);
        DataSet dataSet = parser.parse();

        if (endpoint.isSplitRows()) {
            int counter = 0;
            while (dataSet.next()) {
                endpoint.processDataSet(exchange, dataSet, counter++);
            }
        } else {
            endpoint.processDataSet(exchange, dataSet, dataSet.getRowCount());
        }
    }
View Full Code Here

    public Object unmarshal(Exchange exchange, InputStream stream) throws Exception {
        InputStreamReader reader = new InputStreamReader(stream);
        try {
            Parser parser = createParser(exchange, reader);
            DataSet dataSet = parser.parse();
            return new DataSetList(dataSet);
        } finally {
            reader.close();
        }
    }
View Full Code Here

        this.endpoint = endpoint;
    }

    public void process(Exchange exchange) throws Exception {
        Parser parser = endpoint.createParser(exchange);
        DataSet dataSet = parser.parse();

        if (endpoint.isSplitRows()) {
            int counter = 0;
            while (dataSet.next()) {
                endpoint.processDataSet(dataSet, counter++);
            }
        } else {
            endpoint.processDataSet(dataSet, dataSet.getRowCount());
        }
    }
View Full Code Here

    }

    @SuppressWarnings("unchecked")
    public void process(Exchange exchange) throws Exception {
        Parser parser = endpoint.createParser(exchange);
        DataSet dataSet = parser.parse();

        if (dataSet.getErrorCount() > 0) {
            StringBuilder sb = new StringBuilder();
            sb.append(String.format("Flatpack has found %s errors while parsing", dataSet.getErrorCount()));
            throw new FlatpackException(sb.toString(), exchange, dataSet.getErrors());
        }

        if (endpoint.isSplitRows()) {
            int counter = 0;
            while (dataSet.next()) {
                endpoint.processDataSet(exchange, dataSet, counter++);
            }
        } else {
            endpoint.processDataSet(exchange, dataSet, dataSet.getRowCount());
        }
    }
View Full Code Here

    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();
        }
    }
View Full Code Here

    public Object unmarshal(Exchange exchange, InputStream stream) throws Exception {
        InputStreamReader reader = new InputStreamReader(stream, IOConverter.getCharsetName(exchange));
        try {
            Parser parser = createParser(exchange, reader);
            DataSet dataSet = parser.parse();
            return new DataSetList(dataSet);
        } finally {
            reader.close();
        }
    }
View Full Code Here

TOP

Related Classes of net.sf.flatpack.DataSet

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.