2013年9月15日星期日

Sincerely neighborhoods , built on Mina server transport garbled

We did a project to do with mina server for socket communication , and found that when communicating with the Chinese , in the decoding process will produce garbage problem .
This is the process of decoding the code

public void decode(IoSession session, IoBuffer in, ProtocolDecoderOutput out)throws Exception
{
ByteBuffer buf = in.buf();
byte[] msg = new byte[buf.limit()];
buf.get(msg);
          String ss = new String(msg,"UTF-8");
          out.write(ss);
          out.flush();



Please have had experience in the development of people Laikankana Mina
If results can be smoothly plus
------ Solution ----------------------------- ---------------
I was an intern for me today, so I changed the previous requirement part of the project changed to achieve with mina ; alas have a big head without thinking
------ For reference only --------------------------- ------------
I want points have been resolved quickly come back , just reply and consequently can be oh ~ ~
Tomorrow Results posted
------ For reference only ------------------------------- --------
I rely jacking ah do not let me for answers posted
------ For reference only ---------- -----------------------------
solutions can put up stickers Yeah, with demand solutions ah
- ----- For reference only ---------------------------------------
I rub solution too ! ! !
------ For reference only -------------------------------------- -
wipe , I also want !

没有评论:

发表评论