On 8/21/07, mat <[EMAIL PROTECTED]> wrote:
> The reason why I raised this thread is: recently I am really bothered with
> following issue.
>
> My mina component has to connect to a legacy server written in C++. C++
> server just simply sends out the struct as a message. I think for a C++
> program it is just simple return the struct pointer and use each field.
> However, to my java program that is a disaster(also really lower the
> performance). I have to use all the system.arraycopy to make up each
> field.(Actually it causes OOM). I don't know if you guys ever faced this
> kind of problem. How to solve it?
>
[snip]

well there is a small library I am working on, It helps protocol
programmers by allowing java classes to be somewhat treated as C - C++
structs. You might want to check it, it uses annotations and
reflection and reasonably fast.
I am still working on it so there is no guarantee that its interfaces
wont change, but it works, and there are examples on the site (an
adobe color book reader-writer), check the wiki pages of project.

site is:  http://code.google.com/p/javastruct/

Mehmet

Reply via email to