Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Java > Re: Reading a C struct in java

Thread Tools

Re: Reading a C struct in java

Jeff Higgins
Posts: n/a
Mark wrote:
> Hi,
> I am writing an app in java which reads data from a socket from a C
> language program. The data is encoded as a C struct of char arrays
> something like this;
> typedef struct {
> char type[1];
> char length[6];
> char acknowledge[1];
> char duplicate[1];
> ...
> } type_t;
> How can I decode a structure like this in Java without using JNI (a
> requirement)?

I see no one has mentioned

I don't know if it would help you.


Reply With Quote

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Can *common* struct-members of 2 different struct-types, that are thesame for the first common members, be accessed via pointer cast to either struct-type? John Reye C Programming 28 05-08-2012 12:24 AM
Re: Reading a C struct in java Lothar Kimmeringer Java 45 10-02-2009 04:00 PM
Re: Reading a C struct in java Roedy Green Java 0 09-29-2009 08:38 PM
Reading .Net Web service user defined struct from a Java client Ghislain Tanguay ASP .Net Web Services 0 08-05-2004 01:18 PM
struct my_struct *p = (struct my_struct *)malloc(sizeof(struct my_struct)); Chris Fogelklou C Programming 36 04-20-2004 08:27 AM