Hi Kiran,
Thanks for your reply. Your idea kind of worked.
The thing is, it only works if I specift factory.setDecoderPrefixLength(1);
and then it receives like 255 characters each time, which is unacceptable.
If I specify factory.setDecoderPrefixLength(2) or (4), it gives me a dataLength
error.
My messages will probably be up to 100K, so I'll probably need all 4 bytes.
Must I pad the byte[] with zeroes to fill 32 bits?
I've never been very good with Java bit manipulation. Do you know how I'd do
that?
Regards,
Daniel
> hmm, you need to write the length of the byte array of the string you
> are sending instead of writing the
> length of the string.
> byte[] data = myString.getBytes( "UTF-8" );
> wr.write(data.length);
> wr.write(myString);
>
> HTH
> Kiran Ayyagari
_________________________________________________________________
Hotmail is redefining busy with tools for the New Busy. Get more from your
inbox.
http://www.windowslive.com/campaign/thenewbusy?ocid=PID28326::T:WLMTAGL:ON:WL:en-US:WM_HMP:042010_2