Re: Help - JNI and JMS - data conversion problems
From: Roedy Green (roedy_at_seewebsite.com)
Date: 10/27/03
- Next message: Jase: "Re: Tomcat Hanging"
- Previous message: Harpstein: "Question on JAR files and the Manifest file"
- In reply to: gailw: "Help - JNI and JMS - data conversion problems"
- Next in thread: gailw: "Re: Help - JNI and JMS - data conversion problems"
- Reply: gailw: "Re: Help - JNI and JMS - data conversion problems"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Mon, 27 Oct 2003 20:05:07 GMT
On Mon, 27 Oct 2003 18:53:53 GMT, "gailw" <gailw@worldnet.att.net>
wrote or quoted :
>If I embed some binary bytes (e.g. 0x00,0x01,0x02,0x03,0x04) in the middle
>of the buffer, the data goes all the way thru the send side to the server
>(currently using Sun's j2ee for testing).
You are passing a raw byte array. What it could be is a
DataOutputStream in a raw byte array.
to create such a beast see http://mindprod.com/fileio.html
You can read it with a DataInputStream.
Note when you do this your Strings will be counted UTF-8 format.
You could write them an char[] if you wanted the simplicity of 16-bit
chars.
Trying to encode binary data in Strings is asking for trouble unless
you use something very vanilla like base64.
see http://mindprod.com/jgloss/base64.html
-- Canadian Mind Products, Roedy Green. Coaching, problem solving, economical contract programming. See http://mindprod.com/jgloss/jgloss.html for The Java Glossary.
- Next message: Jase: "Re: Tomcat Hanging"
- Previous message: Harpstein: "Question on JAR files and the Manifest file"
- In reply to: gailw: "Help - JNI and JMS - data conversion problems"
- Next in thread: gailw: "Re: Help - JNI and JMS - data conversion problems"
- Reply: gailw: "Re: Help - JNI and JMS - data conversion problems"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|