java JNI 中的 GetByteArrayRegion

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/6277572/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-10-30 15:09:57  来源:igfitidea点击:

GetByteArrayRegion in JNI

javacjava-native-interfacebyte

提问by Kyborg2011

The question is: Suppose I use the function: (* env) -> GetByteArrayRegion (env, array, 0, len, (jbyte *)buf); In this case, a certain number of bytes written from the array to the buf or vice versa? Maybe a simple question, but I'm confused. Help, please:. In the documentation is not found.

问题是:假设我使用函数: (* env) -> GetByteArrayRegion (env, array, 0, len, (jbyte *)buf); 在这种情况下,一定数量的字节从数组写入 buf 或反之亦然?也许是一个简单的问题,但我很困惑。请帮忙:。在文档中没有找到。

采纳答案by user207421

`Get < PrimitiveTypeArray>ArrayRegion' is a family of functions that copies a region of a primitive array into a buffer. That's what the documentation says. It seems clear to me.

`Get < PrimitiveTypeArray>ArrayRegion' 是一系列函数,用于将原始数组的一个区域复制到缓冲区中。这就是文档所说的。对我来说似乎很清楚。