S
Steve Line
Hi everybody,
I've read many articles about doing this WITH serializable, but using
serializable won't do what I need. I have a java program that must
talk to a box and I don't have access to the sw on this box. I need
to send a datagram with a C structure in it to the box to control it.
The C structure is about 15 or so shorts and ints. I'm converting the
C to Java and need to send the same data format from a java program.
I've defined a Java Class consisting of the ints and shorts in the
right order. Now I want to stick it in a DatagramPacket and send it.
Problem is all the Java serializable capabilities stick other junk
like class id into the output stream. How do I do it and JUST SEND
THE DATA, i.e. the ints and shorts like any old school C or C++
programmer would do? (Also I don't want to use JNI -- too many cygwin
problems).
Steve
I've read many articles about doing this WITH serializable, but using
serializable won't do what I need. I have a java program that must
talk to a box and I don't have access to the sw on this box. I need
to send a datagram with a C structure in it to the box to control it.
The C structure is about 15 or so shorts and ints. I'm converting the
C to Java and need to send the same data format from a java program.
I've defined a Java Class consisting of the ints and shorts in the
right order. Now I want to stick it in a DatagramPacket and send it.
Problem is all the Java serializable capabilities stick other junk
like class id into the output stream. How do I do it and JUST SEND
THE DATA, i.e. the ints and shorts like any old school C or C++
programmer would do? (Also I don't want to use JNI -- too many cygwin
problems).
Steve