Generated on: Thu Mar 29 07:46:58 PDT 2012 for custom file set
// doxy/ or-tools/ src/ base/

JNIUtil Class Reference

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. More...

#include <jniutil.h>

List of all members.

Static Public Member Functions

static jstring MakeJString (JNIEnv *env, const char *cstr)
 Creates a java jstring from a null-terminated UTF-8 encoded C String The caller must delete the jstring reference.
static char * MakeCString (JNIEnv *env, jstring str)
 Creates a null-terminated UTF-8 encoded C string from a jstring.
static char * MakeCharArray (JNIEnv *env, jbyteArray a, int *size)
 Creates a new char array from a jbyteArray.
static jbyteArray MakeJByteArray (JNIEnv *env, const char *a, int size)
 Produces a jbyteArray from a char array.


Detailed Description

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License.

You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Definition at line 21 of file jniutil.h.


Member Function Documentation

static jstring JNIUtil::MakeJString ( JNIEnv *  env,
const char *  cstr 
) [inline, static]

Creates a java jstring from a null-terminated UTF-8 encoded C String The caller must delete the jstring reference.

Definition at line 25 of file jniutil.h.

static char* JNIUtil::MakeCString ( JNIEnv *  env,
jstring  str 
) [inline, static]

Creates a null-terminated UTF-8 encoded C string from a jstring.

The returned string should be "delete[]"-ed when no longer needed.

Definition at line 32 of file jniutil.h.

static char* JNIUtil::MakeCharArray ( JNIEnv *  env,
jbyteArray  a,
int *  size 
) [inline, static]

Creates a new char array from a jbyteArray.

The caller must delete[] the returned array.

Definition at line 45 of file jniutil.h.

static jbyteArray JNIUtil::MakeJByteArray ( JNIEnv *  env,
const char *  a,
int  size 
) [inline, static]

Produces a jbyteArray from a char array.

Definition at line 57 of file jniutil.h.


The documentation for this class was generated from the following file: