* src/native/jni.cpp: [OPENJDK] Implemented jni_GetDirectBufferCapacity.
[cacao.git] / src / vm / javaobjects.hpp
index f60026b97deffd601c0f8c6df31cca6d280c7641..b6061a1b8258f02210274a653fb8179155de4157 100644 (file)
@@ -2570,6 +2570,7 @@ public:
 
        // Getters.
        void* get_address() const;
+       int32_t get_capacity() const;
 };
 
 
@@ -2578,6 +2579,11 @@ inline void* java_nio_Buffer::get_address() const
        return get<void*>(_handle, offset_address);
 }
 
+inline int32_t java_nio_Buffer::get_capacity() const
+{
+       return get<int32_t>(_handle, offset_capacity);
+}
+
 #endif // WITH_JAVA_RUNTIME_LIBRARY_OPENJDK