Re: Reading a C struct in java

Discussion in 'Java' started by Roedy Green, Sep 29, 2009.

  1. Roedy Green

    Roedy Green Guest

    On Tue, 29 Sep 2009 08:18:48 -0700, Patricia Shanahan <>
    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
    http://mindprod.com

    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)
     
    Roedy Green, Sep 29, 2009
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. RA Scheltema
    Replies:
    3
    Views:
    424
    RA Scheltema
    Jan 6, 2004
  2. Chris Fogelklou
    Replies:
    36
    Views:
    1,445
    Chris Fogelklou
    Apr 20, 2004
  3. Lothar Kimmeringer

    Re: Reading a C struct in java

    Lothar Kimmeringer, Sep 29, 2009, in forum: Java
    Replies:
    45
    Views:
    1,913
    Bent C Dalager
    Oct 2, 2009
  4. Jeff Higgins

    Re: Reading a C struct in java

    Jeff Higgins, Oct 15, 2009, in forum: Java
    Replies:
    0
    Views:
    610
    Jeff Higgins
    Oct 15, 2009
  5. Ghislain Tanguay

    Reading .Net Web service user defined struct from a Java client

    Ghislain Tanguay, Aug 5, 2004, in forum: ASP .Net Web Services
    Replies:
    0
    Views:
    154
    Ghislain Tanguay
    Aug 5, 2004
Loading...

Share This Page