On 27 Aug 2003 07:34:28 -0700,
(phantom) wrote or
quoted :
>Taking your advice I wrapped the output sockets with DataOutputStream
>and send the length of the string in hex as bytes using the
>write(byte[],offset, len) method, now when I try to send the string
>using the writeChars(str) method as is the method it sends a 2Byte per
>character that i send.
in an email you told me the target of this is RPG.
It is better to tackle this from the RPG end, and figure out what sort
of file it wants.
RPG has surely evolved since I last used it.
It may want 8-bit chars in some encoding.
It may want little-endian binary.
It may want big-endian binary.
It may want 16-bit chars.
Decide that first,then worry about how to make Java produce.
See
http://mindprod.com/fileio.html
for sample code.
--
Canadian Mind Products, Roedy Green.
Coaching, problem solving, economical contract programming.
See
http://mindprod.com/jgloss/jgloss.html for The Java Glossary.