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 javolution.io.Struct
<http://javolution.org/target/site/apidocs/javolution/io/Struct.html>
I don't know if it would help you.
JH
|