grizzly samples: How to replace the ObjectInputStream with bytes?
it doesn't work.
anyone can help me ?
///////////////////////////////to be replaced//////////////////////////////////////////
//ObjectInputStream ois = new ObjectInputStream(stream);
//Object[] result = (Object[]) ois.readObject();
//ois.close();
//return result;
////////////////////////////replace with/////////////////////////////////////////////////
BufferedInputStream bis = new BufferedInputStream(stream);
byte[] buf = new byte[bis.available()];
int read = bis.read(buf);
String s = new String(buf,"gbk");
System.out.println("rcv["+s+"]");
/////////////////////////////////////////////////////////////////////////////////////////////
[Message sent by forum member 'jdpeng' (jdpeng)]
http://forums.java.net/jive/thread.jspa?messageID=338907