Mercurial > hg > Members > kazz > msgpack
changeset 6:59f751a389b1 default tip
read and write
author | one |
---|---|
date | Mon, 15 Aug 2011 19:42:10 +0900 |
parents | 283ddbe5e7dc |
children | |
files | src/org/msgpack/test/MessagePackTest.java |
diffstat | 1 files changed, 1 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/src/org/msgpack/test/MessagePackTest.java Fri Aug 12 03:43:41 2011 +0900 +++ b/src/org/msgpack/test/MessagePackTest.java Mon Aug 15 19:42:10 2011 +0900 @@ -19,12 +19,10 @@ src.next.name = "jiro"; src.next.age = 23; MessagePack msgpack = new MessagePack(); - msgpack.register(Employee.class); try { byte[] buf = msgpack.write(src); - Value dst = msgpack.read(buf); + Employee dst = msgpack.read(buf, Employee.class); System.out.println(dst); - } catch (IOException e1) { e1.printStackTrace(); }