{"action":"closed","issue":{"url":"https://api.github.com/repos/terrymanu/miracle-framework/issues/2","repository_url":"https://api.github.com/repos/terrymanu/miracle-framework","labels_url":"https://api.github.com/repos/terrymanu/miracle-framework/issues/2/labels{/name}","comments_url":"https://api.github.com/repos/terrymanu/miracle-framework/issues/2/comments","events_url":"https://api.github.com/repos/terrymanu/miracle-framework/issues/2/events","html_url":"https://github.com/terrymanu/miracle-framework/issues/2","id":187608644,"number":2,"title":"KryoPool 中编码为什么要先写入4个字节","user":{"login":"chulung","id":7258540,"avatar_url":"https://avatars.githubusercontent.com/u/7258540?v=3","gravatar_id":"","url":"https://api.github.com/users/chulung","html_url":"https://github.com/chulung","followers_url":"https://api.github.com/users/chulung/followers","following_url":"https://api.github.com/users/chulung/following{/other_user}","gists_url":"https://api.github.com/users/chulung/gists{/gist_id}","starred_url":"https://api.github.com/users/chulung/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chulung/subscriptions","organizations_url":"https://api.github.com/users/chulung/orgs","repos_url":"https://api.github.com/users/chulung/repos","events_url":"https://api.github.com/users/chulung/events{/privacy}","received_events_url":"https://api.github.com/users/chulung/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2016-11-07T01:50:48Z","updated_at":"2016-11-15T13:21:22Z","closed_at":"2016-11-15T13:21:22Z","body":"你好，请教一个问题\r\n我在最近在一个netty工程中引入了kryo，在使用kryo的时候参考了你的实现\r\n但疑问是在类KryoPool 中 为什么先要写入LENGTH_PLACEHOLDER这么4个字节，我在使用的时候debug发现这会导致解码失败\r\n```\r\npublic void encode(final ByteBuf out, final Object message) throws IOException {\r\n\tByteBufOutputStream bout = new ByteBufOutputStream(out);\r\n\tbout.write(LENGTH_PLACEHOLDER);\r\n\tKryoSerialization kryoSerialization = new KryoSerialization(kyroFactory);\r\n\tkryoSerialization.serialize(bout, message);\r\n}\r\n```\r\n谢谢！"}}
{"actor":{"display_login":"chulung"}}