# HG changeset patch # User sugi # Date 1420788855 -32400 # Node ID 84614ab9b758d69d3d4bfb19524f135dfabc96b6 # Parent ea3f9fc4f0ced3887a7501f873819f45007d9e09 remove no need method diff -r ea3f9fc4f0ce -r 84614ab9b758 src/main/java/alice/daemon/IncomingTcpConnection.java --- a/src/main/java/alice/daemon/IncomingTcpConnection.java Fri Jan 09 16:15:16 2015 +0900 +++ b/src/main/java/alice/daemon/IncomingTcpConnection.java Fri Jan 09 16:34:15 2015 +0900 @@ -58,7 +58,7 @@ switch (type) { case UPDATE: case PUT: - rData = new ReceiveData(getSerializedByteArray(unpacker), msg.compressed, msg.serialized); + rData = new ReceiveData(unpacker.getSerializedByteArray(unpacker.readInt()), msg.compressed, msg.serialized); if (msg.setTime) { rData.setTime = true; rData.time = msg.time; @@ -79,7 +79,7 @@ break; case REPLY: cmd = manager.getAndRemoveCmd(msg.seq); - rData = new ReceiveData(getSerializedByteArray(unpacker), msg.compressed, msg.serialized); + rData = new ReceiveData(unpacker.getSerializedByteArray(unpacker.readInt()), msg.compressed, msg.serialized); Command rCmd = new Command(type, null, null, rData, msg.index, msg.seq, null, null, ""); cmd.cs.ids.reply(cmd.receiver, rCmd); break; @@ -102,19 +102,6 @@ return; } } - - } - - private byte[] getSerializedByteArray(Unpacker unpacker) { - int len; - byte[] b = null; - try { - len = unpacker.readInt(); - b = unpacker.getSerializedByteArray(len); - } catch (IOException e) { - e.printStackTrace(); - } - return b; } public void setReverseKey(String name) {