mirror of
https://github.com/kiwix/java-libkiwix.git
synced 2025-08-04 03:26:08 -04:00
Do not put binary illustration data into a string.
Java String must contains utf8 content. Illusration data which is PNG is definitively not a utf8 string. Fix #73
This commit is contained in:
parent
853233ae37
commit
1cbbd4eaa5
@ -50,4 +50,7 @@ METHOD0(jstring, url) {
|
||||
return TO_JNI(THIS->url);
|
||||
} CATCH_EXCEPTION(nullptr)
|
||||
|
||||
GETTER(jstring, getData)
|
||||
METHOD0(jbyteArray, getData) {
|
||||
auto data = THIS->getData();
|
||||
return cArray2jni(data.data(), data.size(), env);
|
||||
} CATCH_EXCEPTION(nullptr)
|
||||
|
@ -8,7 +8,7 @@ public class Illustration
|
||||
public native String mimeType();
|
||||
public native String url();
|
||||
|
||||
public native String getData();
|
||||
public native byte[] getData();
|
||||
@Override
|
||||
protected void finalize() { dispose(); }
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user