[Dailydave] Java

Chris Eagle cseagle at redshift.com
Tue Nov 14 00:29:47 Local tim 2006


Dave Aitel wrote:
> Here I am, spending all day writing code in a language that is
> statically typed. It's like eating all your food with a good helping
> of sand. How does one convert a byte[] buf; into a String so you can
> send it down the wire using a DataOutputStream class? Oooh, let's
> chain a bunch of converters together. Blimey!
> 

What is your goal on the remote side?  Does it need to unmarshall as a
Java String? Or are you just trying to get the bytes on the wire?

former: dos.writeUTF(new String(buf));
later:  dos.write(buf);

How many/what type of converters do you feel compelled to use?

Chris


More information about the Dailydave mailing list