Package org.apache.niolex.commons.stream

Examples of org.apache.niolex.commons.stream.JsonProxy.readObject()


        ByteArrayOutputStream bos = new ByteArrayOutputStream();
        JacksonUtil.writeObj(bos, bench);
        JacksonUtil.writeObj(bos, q);
        byte[] bs = bos.toByteArray();
        JsonProxy iii = new JsonProxy(new ByteArrayInputStream(bs));
        Benchmark cp = iii.readObject(Benchmark.class);
        Bean t = iii.readObject(Bean.class);
        assertTrue(t.getId() != 0);
        assertTrue(t.getBirth().getTime() == 1338008328334L);
        assertTrue(bench.equals(cp));
      } catch (IOException e) {
View Full Code Here


        JacksonUtil.writeObj(bos, bench);
        JacksonUtil.writeObj(bos, q);
        byte[] bs = bos.toByteArray();
        JsonProxy iii = new JsonProxy(new ByteArrayInputStream(bs));
        Benchmark cp = iii.readObject(Benchmark.class);
        Bean t = iii.readObject(Bean.class);
        assertTrue(t.getId() != 0);
        assertTrue(t.getBirth().getTime() == 1338008328334L);
        assertTrue(bench.equals(cp));
      } catch (IOException e) {
        e.printStackTrace();
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.