diff options
author | Sebastian Rasmussen <sebras@gmail.com> | 2017-11-22 22:26:32 +0100 |
---|---|---|
committer | Tor Andersson <tor.andersson@artifex.com> | 2017-11-22 23:09:51 +0100 |
commit | c01e1a267bac0e053b78fba6ebbd0c199c9adabe (patch) | |
tree | 1074c87b59073b4eeff982a82ac8d68cc6b601a3 /platform/java | |
parent | 6aed88ce02fa6fa77b4c9b4e91846a6160119335 (diff) | |
download | mupdf-c01e1a267bac0e053b78fba6ebbd0c199c9adabe.tar.xz |
jni: Remove unnecessary PDFObject.asByteName().
Diffstat (limited to 'platform/java')
-rw-r--r-- | platform/java/mupdf_native.c | 33 | ||||
-rw-r--r-- | platform/java/mupdf_native.h | 8 | ||||
-rw-r--r-- | platform/java/src/com/artifex/mupdf/fitz/PDFObject.java | 1 |
3 files changed, 0 insertions, 42 deletions
diff --git a/platform/java/mupdf_native.c b/platform/java/mupdf_native.c index 1d9890bb..96d7f742 100644 --- a/platform/java/mupdf_native.c +++ b/platform/java/mupdf_native.c @@ -7861,39 +7861,6 @@ FUN(PDFObject_asName)(JNIEnv *env, jobject self) return (*env)->NewStringUTF(env, str); } -JNIEXPORT jobject JNICALL -FUN(PDFObject_asByteName)(JNIEnv *env, jobject self) -{ - fz_context *ctx = get_context(env); - pdf_obj *obj = from_PDFObject(env, self); - const char *str = NULL; - jobject jbs = NULL; - jbyte *bs = NULL; - size_t len; - - if (!ctx || !obj) return NULL; - - fz_try(ctx) - str = pdf_to_name(ctx, obj); - fz_catch(ctx) - { - jni_rethrow(env, ctx); - return NULL; - } - - len = strlen(str); - jbs = (*env)->NewByteArray(env, (jsize)len); - if (!jbs) return NULL; - bs = (*env)->GetByteArrayElements(env, jbs, NULL); - if (!bs) return NULL; - - memcpy(bs, str, len); - - (*env)->ReleaseByteArrayElements(env, jbs, bs, 0); - - return jbs; -} - JNIEXPORT jint JNICALL FUN(PDFObject_size)(JNIEnv *env, jobject self) { diff --git a/platform/java/mupdf_native.h b/platform/java/mupdf_native.h index ee715713..42bb594d 100644 --- a/platform/java/mupdf_native.h +++ b/platform/java/mupdf_native.h @@ -2043,14 +2043,6 @@ JNIEXPORT jstring JNICALL Java_com_artifex_mupdf_fitz_PDFObject_asName /* * Class: com_artifex_mupdf_fitz_PDFObject - * Method: asByteName - * Signature: ()[B - */ -JNIEXPORT jbyteArray JNICALL Java_com_artifex_mupdf_fitz_PDFObject_asByteName - (JNIEnv *, jobject); - -/* - * Class: com_artifex_mupdf_fitz_PDFObject * Method: asString * Signature: ()Ljava/lang/String; */ diff --git a/platform/java/src/com/artifex/mupdf/fitz/PDFObject.java b/platform/java/src/com/artifex/mupdf/fitz/PDFObject.java index 0f9741b5..02bbe4f4 100644 --- a/platform/java/src/com/artifex/mupdf/fitz/PDFObject.java +++ b/platform/java/src/com/artifex/mupdf/fitz/PDFObject.java @@ -38,7 +38,6 @@ public class PDFObject public native float asFloat(); public native int asIndirect(); public native String asName(); - public native byte[] asByteName(); public native String asString(); public native byte[] asByteString(); |