Results 1 to 1 of 1
- 11-17-2010, 03:58 PM #1Member
- Join Date
- Nov 2010
- Rep Power
Get length of xmlMethod as a Byte Array in Little Endian notation
I'm working with a technology where I have to make use of sockets, xml, and little endian notation. Using the pseudo-code from previous discussions on the technology and documentation I have to do the following:
String xmlMethod = "<method>.....</method>"
Socket mySocket = new Socket ("localhost", 9003)
// Get length of xmlMethod as a Byte Array in Little Endian notation
int methodLength = xmlMethod.length()
ByteArray methodLengthAsBytes = methodLength.convertToLittleEndianBytes()
// Write length to socket
// Write actual xml data
I'm having difficulty with the parts I've listed in bold. I need to find the length of my xmlMethod (which is fine), but I need it as a ByteArray in little endian notation in order to write it to a socket. This is following the protocol the developers of the technology have advised using.
Can you let me know if you have any advice on this?
- By kgkamaraj in forum New To JavaReplies: 4Last Post: 09-13-2011, 11:32 AM
- By Ms.Ranjan in forum JavaServer Pages (JSP) and JSTLReplies: 1Last Post: 07-03-2010, 12:15 AM
- By Krooger in forum New To JavaReplies: 2Last Post: 12-10-2009, 06:47 PM
- By nicolek808 in forum New To JavaReplies: 4Last Post: 09-10-2009, 09:12 AM
- By SKaur in forum New To JavaReplies: 3Last Post: 01-15-2008, 07:28 PM