aspose file tools*
The moose likes Java Micro Edition and the fly likes Data Structure Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Mobile » Java Micro Edition
Bookmark "Data Structure" Watch "Data Structure" New topic
Author

Data Structure

Isaias C. Barroso
Ranch Hand

Joined: Jan 22, 2002
Posts: 165
Hi all,
I need to transfer the follow Data Structure for to a Socket with J2ME
Structure in C
typedef struct data_outboundrec
{
unsigned long intcnumber;
unsigned chardevice_id[20];
unsigned char data[255];
unsigned intdatasize;
} DATAOUTBOUND_REC;
how to make this.
Thanks


Isaias
William Brogden
Author and all-around good cowpoke
Rancher

Joined: Mar 22, 2000
Posts: 12806
    
    5
I would do that by creating a byte[] and writing methods to fill/extract each of the variables. That way you have total control over ended-ness.
Transmitting / reading a byte[] is just one call.
Bill
Isaias C. Barroso
Ranch Hand

Joined: Jan 22, 2002
Posts: 165
Thanks
 
 
subject: Data Structure