~svn/ubuntu/raring/subversion/ppa

« back to all changes in this revision

Viewing changes to subversion/bindings/java/javahl/native/JNIByteArray.h

  • Committer: Bazaar Package Importer
  • Author(s): Adam Conrad
  • Date: 2005-12-05 01:26:14 UTC
  • mfrom: (1.1.2 upstream)
  • Revision ID: james.westby@ubuntu.com-20051205012614-qom4xfypgtsqc2xq
Tags: 1.2.3dfsg1-3ubuntu1
Merge with the final Debian release of 1.2.3dfsg1-3, bringing in
fixes to the clean target, better documentation of the libdb4.3
upgrade and build fixes to work with swig1.3_1.3.27.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/**
 
2
 * @copyright
 
3
 * ====================================================================
 
4
 * Copyright (c) 2003-2004 CollabNet.  All rights reserved.
 
5
 *
 
6
 * This software is licensed as described in the file COPYING, which
 
7
 * you should have received as part of this distribution.  The terms
 
8
 * are also available at http://subversion.tigris.org/license-1.html.
 
9
 * If newer versions of this license are posted there, you may use a
 
10
 * newer version instead, at your option.
 
11
 *
 
12
 * This software consists of voluntary contributions made by many
 
13
 * individuals.  For exact contribution history, see the revision
 
14
 * history and logs, available at http://subversion.tigris.org/.
 
15
 * ====================================================================
 
16
 * @endcopyright
 
17
 *
 
18
 * @file JNIByteArray.h
 
19
 * @brief Interface of the class JNIByteArray
 
20
 */
 
21
 
 
22
#if !defined(AFX_JNIBYTEARRAY_H__FB74054F_CD5E_41D5_A4B0_25DE9A8574CF__INCLUDED_)
 
23
#define AFX_JNIBYTEARRAY_H__FB74054F_CD5E_41D5_A4B0_25DE9A8574CF__INCLUDED_
 
24
 
 
25
#if _MSC_VER > 1000
 
26
#pragma once
 
27
#endif // _MSC_VER > 1000
 
28
 
 
29
#include <jni.h>
 
30
/**
 
31
 * this class holds a java byte array to give easy access to its bytes
 
32
 */
 
33
class JNIByteArray
 
34
{
 
35
private:
 
36
    /**
 
37
     *  a local reference to the byte array
 
38
     */
 
39
    jbyteArray m_array;
 
40
    /**
 
41
     *  the cache bytes of the byte array
 
42
     */
 
43
    jbyte *m_data;
 
44
    /**
 
45
     * flag that the underlying byte array reference should be deleted at 
 
46
     * destruction
 
47
     */
 
48
    bool m_deleteByteArray;
 
49
public:
 
50
    bool isNull();
 
51
    const signed char * getBytes();
 
52
    int getLength();
 
53
    JNIByteArray(jbyteArray jba, bool deleteByteArray = false);
 
54
    ~JNIByteArray();
 
55
 
 
56
};
 
57
 
 
58
//!defined(AFX_JNIBYTEARRAY_H__FB74054F_CD5E_41D5_A4B0_25DE9A8574CF__INCLUDED_)
 
59
#endif