Package org.javaee7.json.streaming.parser

Examples of org.javaee7.json.streaming.parser.JsonParserFromStreamTest


@Named
public class SalesProcessor implements ItemProcessor {

    @Override
    public Sales processItem(Object s) {
        Sales sales = new Sales();
       
        StringTokenizer tokens = new StringTokenizer((String)s, ",");
        sales.setId(Integer.parseInt(tokens.nextToken()));
        sales.setAmount(Float.parseFloat(tokens.nextToken()));
       
        return sales;
    }
View Full Code Here

TOP

Related Classes of org.javaee7.json.streaming.parser.JsonParserFromStreamTest

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.