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

Roedy Green
Posts: n/a
On Tue, 29 Sep 2009 08:18:48 -0700, Patricia Shanahan <(E-Mail Removed)>
wrote, quoted or indirectly quoted someone who said :

>should be a four element array of byte[], with each element containing
>the raw data from one of the fields. That could be used, for example, as
>a constructor parameter for a class that represents type_t in Java, with
>each fields converted to a more useful type. For example, if duplicate
>is logically a boolean, the class would have a boolean field,
>initialized according to how the C char represents booleans.

This is what DataInputStream and LEDataInputStream do for a living.
Roedy Green Canadian Mind Products

On two occasions I have been asked [by members of Parliament], "Pray, Mr. Babbage, if you put into the machine wrong figures, will the right answers come out?" I am not able rightly to apprehend the kind of confusion of ideas that could provoke such a question.
~ Charles Babbage (born: 1791-12-26 died: 1871-10-18 at age: 79)
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 Jeff Higgins Java 0 10-15-2009 01:39 PM
Re: Reading a C struct in java Lothar Kimmeringer Java 45 10-02-2009 04:00 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