javacommons/utils/inc/jniarrayutils.h
branchRCL_3
changeset 19 04becd199f91
equal deleted inserted replaced
16:f5050f1da672 19:04becd199f91
       
     1 /*
       
     2 * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
       
     3 * All rights reserved.
       
     4 * This component and the accompanying materials are made available
       
     5 * under the terms of "Eclipse Public License v1.0"
       
     6 * which accompanies this distribution, and is available
       
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     8 *
       
     9 * Initial Contributors:
       
    10 * Nokia Corporation - initial contribution.
       
    11 *
       
    12 * Contributors:
       
    13 *
       
    14 * Description:
       
    15 *
       
    16 */
       
    17 
       
    18 #ifndef JNIARRAYUTILS_H
       
    19 #define JNIARRAYUTILS_H
       
    20 
       
    21 #include <jni.h>
       
    22 #include "javaosheaders.h"
       
    23 
       
    24 
       
    25 class JNIArrayUtils
       
    26 {
       
    27 public:
       
    28     OS_IMPORT static int CopyToNative(JNIEnv& aJni, jbyteArray aJavaBuffer,
       
    29                                       int aOffset, int aLength, char* aNativeBuffer);
       
    30 
       
    31 
       
    32     OS_IMPORT static int CopyToJava(JNIEnv& aJni, const char * aNativeBuffer,
       
    33                                     int aNativeBufferLength, jbyteArray aJavaBuffer, int aOffset,
       
    34                                     int aLength);
       
    35 
       
    36     OS_IMPORT static jstring WStringToJavaString(JNIEnv& aJni, const wchar_t* aString,
       
    37             const int aLength);
       
    38 
       
    39 
       
    40 };
       
    41 
       
    42 
       
    43 #endif // JNIARRAYUTILS_H