5 messages in net.java.dev.jna.usersRe: AW: [jna-users] retrieving byte a...
FromSent OnAttachments
Schneider JannApr 28, 2009 2:04 am 
Timothy WallApr 28, 2009 4:08 am 
Schneider JannApr 28, 2009 4:22 am 
Timothy WallApr 28, 2009 4:46 am 
Schneider JannApr 28, 2009 5:33 am 
Actions with this message:
Paste this link in email or IM:
Paste this link in email or IM:
Atom feed for this thread
Paste this URL into your reader:
Subject:Re: AW: [jna-users] retrieving byte arrayActions...
From:Timothy Wall (twal@dev.java.net)
Date:Apr 28, 2009 4:46:31 am
List:net.java.dev.jna.users

On Apr 28, 2009, at 7:22 AM, Schneider Jann wrote:

Problem might be, to know about the arrays size on java side. As mentioned: i have 3 parts of data i should get in Java: the file header, the bitmap info header and the data itselve. And this three things are build on the c++ side... so i can only make a guess, how big the array has to be..

This isn't a java-specific problem. If the C code is to be filling in a buffer, you need to indicate the buffer size with an extra argument.

If Java is to be reading the file or accessing the file using native code, then it's up to Java to parse the headers or meta-information.

What do you think about using some Pointers in this case? And simply using Pointer.getbyteArray()

You haven't really given any details of either your proposed high- level pseudocode or actual interface usage using memory instead of a file, so I can't comment.