aboutsummaryrefslogtreecommitdiffstats
path: root/java_jni/jni/jau/ByteInStream_URL.cxx
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2022-08-05 17:58:06 +0200
committerSven Gothel <[email protected]>2022-08-05 17:58:06 +0200
commitc71be85f2be7b9e07cf13ec93926bbf1f8ad8bed (patch)
tree17ccf05c2f89fc4394dd378b422e57a3a48eb29d /java_jni/jni/jau/ByteInStream_URL.cxx
parentf8bd6cbacb30c0c10dba47fa896e0f37e3d83272 (diff)
Add ByteOutStream and ByteOutStream_File POSIX 'fd' implementation, ...
- Add ByteOutStream interface - Add ByteOutStream_File implementation similar to ByteInStream_File, based on POSIX fd etc. - Add is_open() to ByteInStream and ByteOutStream interface.
Diffstat (limited to 'java_jni/jni/jau/ByteInStream_URL.cxx')
-rw-r--r--java_jni/jni/jau/ByteInStream_URL.cxx10
1 files changed, 10 insertions, 0 deletions
diff --git a/java_jni/jni/jau/ByteInStream_URL.cxx b/java_jni/jni/jau/ByteInStream_URL.cxx
index 17892d5..7a634ac 100644
--- a/java_jni/jni/jau/ByteInStream_URL.cxx
+++ b/java_jni/jni/jau/ByteInStream_URL.cxx
@@ -66,6 +66,16 @@ void Java_org_jau_io_ByteInStream_1URL_dtorImpl(JNIEnv *env, jclass clazz, jlong
}
}
+jboolean Java_org_jau_io_ByteInStream_1URL_is_1open(JNIEnv *env, jobject obj) {
+ try {
+ jau::jni::shared_ptr_ref<jau::io::ByteInStream_URL> 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_1URL_clearImpl(JNIEnv *env, jobject obj, jint mask) {
try {
jau::jni::shared_ptr_ref<jau::io::ByteInStream_URL> ref(env, obj); // hold until done