diff options
Diffstat (limited to 'java_jni/jni/jau/ByteInStream_File.cxx')
-rw-r--r-- | java_jni/jni/jau/ByteInStream_File.cxx | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/java_jni/jni/jau/ByteInStream_File.cxx b/java_jni/jni/jau/ByteInStream_File.cxx index 6e6fb4b..eb4421f 100644 --- a/java_jni/jni/jau/ByteInStream_File.cxx +++ b/java_jni/jni/jau/ByteInStream_File.cxx @@ -31,11 +31,6 @@ // #include "org_jau_io_IOState.h" #include "org_jau_io_ByteInStream_File.h" - -extern "C" { - #include <fcntl.h> -} - // // IOState // @@ -115,6 +110,16 @@ void Java_org_jau_io_ByteInStream_1File_dtorImpl(JNIEnv *env, jclass clazz, jlon } } +jboolean Java_org_jau_io_ByteInStream_1File_is_1open(JNIEnv *env, jobject obj) { + try { + jau::jni::shared_ptr_ref<jau::io::ByteInStream_File> ref(env, obj); // hold until done + return ref->is_open() ? JNI_TRUE : JNI_FALSE; + } catch(...) { + rethrow_and_raise_java_exception_jau(env); + } + return JNI_FALSE; +} + void Java_org_jau_io_ByteInStream_1File_clearImpl(JNIEnv *env, jobject obj, jint mask) { try { jau::jni::shared_ptr_ref<jau::io::ByteInStream_File> ref(env, obj); // hold until done |