JNI Types and Data Structures

 

Table 3-1 Primitive Types and Native Equivalents
Java Type
Native Type
Description
boolean
jboolean
unsigned 8 bits
byte
jbyte
signed 8 bits
char
jchar
unsigned 16 bits
short
jshort
signed 16 bits
int
jint
signed 32 bits
long
jlong
signed 64 bits
float
jfloat
32 bits
double
jdouble
64 bits
void
void
N/A

 

Type Signatures

The JNI uses the Java VM’s representation of type signatures. Table 3-2 shows these type signatures.
Table 3-2 Java VM Type Signatures
Type Signature
Java Type
Z
boolean
B
byte
C
char
S
short
I
int
J
long
F
float
D
double   

L fully-qualified-class ;
fully-qualified-class
[ type
type[]
( arg-types ) ret-type
method type
For example, the Java method:
   long f (int n, String s, int[] arr); 
has the following type signature:
   (ILjava/lang/String;[I)J 
 
 
 

Comments

  1. Live Casino - Gold Casino
    Our site is operated by an international casino group. The website 188bet supports 퍼스트 카지노 responsible gambling and provides an leovegas outstanding selection of games and games to all customers. Play now.Bonus: 200% up to €300

    ReplyDelete

Post a Comment

Popular posts from this blog

Bluetooth Data Transfer Example

How to Create & Extract tar.gz and tar.bz2 Files in Linux