I am thinking of adding another component, eg image, as follows:

 xxxaaaaThis is a greeting.iiibbbbmmmmmmmm...

where:
xxx  - message type (3 bytes, text)
aaaa - integer, 4 bytes, length of text
'This is a greeting.' - the actual text
iii  - image type (png, gif)
bbbb - image length
mmmmmmmm... - image data

I suppose your recommendation still stands, extract byte by byte.


Use a byte buffer as Miguel suggested. Extract byte by byte (or long
by long).
You'll have to deal with the little endian / big endian problem
regardless of the language/stack you chose. If you have the latitude,
don't use binary...



--
Using Opera's revolutionary email client: http://www.opera.com/mail/

--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to