🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.jbuilder.java.language
Article #14777

Re: GetByteArrayRegion in Java Native Interface header file

#14777
From: Steve Schafer (TeamB)
Date: Fri, 30 Jul 1999 00:00
24 lines
1322 bytes
On Fri, 30 Jul 1999 16:41:08 +0200, Marcel van den Dungen
<info@c-content.nl> wrote:

>In jni.h is defined:
>void (JNICALL *GetByteArrayRegion)
>(JNIENV *env, jbyteArray array, jsize start, jsize len, jbyte *buf)
>
>How exactly does this function work?

It copies a portion of a Java array into a buffer that you supply.

>Can I use this function to copy some elements from the C array to the
>Java array?

No, you should use SetByteArrayRegion for that. You could, of course,
use GetByteArrayRegion to copy a portion of the Java array into a
buffer, modify some of the bytes, and then use SetByteArrayRegion to
copy the whole thing back to the Java application.

>Should I call the release-function afterwards?

No.

-Steve
Technical Details
Message-ID: <37bc3093.261652248@90.0.0.40>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail
References: <37A1B983.6728FC48@c-content.nl>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: f74b3,5f16c44a987629c8
X-Google-Attributes: gidf74b3,public
From: pandeng@telepath.com (Steve Schafer (TeamB))
Subject: Re: GetByteArrayRegion in Java Native Interface header file
Date: 1999/07/30
Message-ID: <37bc3093.261652248@90.0.0.40>
X-Deja-AN: 507147175
Content-Transfer-Encoding: 7bit
References: <37A1B983.6728FC48@c-content.nl>
Content-Type: text/plain; charset=us-ascii
Organization: TeamB
Mime-Version: 1.0
Reply-To: pandeng@telepath.com
Newsgroups: borland.public.jbuilder.java.language