-------- Original Message --------
Subject: Re: Re: in grizzly samples: How to replace the
ObjectInputStream withbytes?
Date: Thu, 02 Apr 2009 09:02:19 +0800
From: Jdpeng <ca520_at_21cn.com>
Reply-To: users_at_glassfish.dev.java.net
To: users <users_at_glassfish.dev.java.net>
References:
<3064656.401401237976556097.JavaMail.tomcat_at_sdcst12.sjc.collab.net>
<49D0C8ED.8060205_at_sun.com>
Jeanfrancois Arcand,您好!
I have solved this problem.My metod is wrong,I find the better way to
write to ByteBuffer.
thanks however.
======= 2009-03-30 21:28:25 您在来信中写道:=======
>Salut,
>
>glassfish_at_javadesktop.org wrote:
>> 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)]
>
>Can you point me to the sample you are using?
>
>Thanks,
>
>-- Jeanfrancois
>
>
>
>
>>
>> http://forums.java.net/jive/thread.jspa?messageID=338907
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe_at_glassfish.dev.java.net
>> For additional commands, e-mail: users-help_at_glassfish.dev.java.net
>>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: users-unsubscribe_at_glassfish.dev.java.net
>For additional commands, e-mail: users-help_at_glassfish.dev.java.net
>
= = = = = = = = = = = = = = = = = = = =
致
礼!
Jdpeng
ca520_at_21cn.com
2009-04-02