summaryrefslogtreecommitdiff
path: root/platform/java/mupdf_native.h
diff options
context:
space:
mode:
authorTor Andersson <tor.andersson@artifex.com>2018-01-27 00:34:30 +0100
committerTor Andersson <tor.andersson@artifex.com>2018-01-27 00:35:22 +0100
commit5f90cd61cb22c752217dc5754eef7a0ea4c4a175 (patch)
tree1889362b8be3dbdb223eaf6ae651b29ef407c6b4 /platform/java/mupdf_native.h
parent4aced20954bd5471fa48591663550649b0dc171e (diff)
downloadmupdf-5f90cd61cb22c752217dc5754eef7a0ea4c4a175.tar.xz
jni: Add Java interfaces to fz_stream and fz_output types.
This will allow us to read and write documents using I/O written in Java, exposed by SeekableInputStream and SeekableOutputStream. We supply an example FileStream which implements seekable streams backed by a RandomAccessFile.
Diffstat (limited to 'platform/java/mupdf_native.h')
-rw-r--r--platform/java/mupdf_native.h66
1 files changed, 66 insertions, 0 deletions
diff --git a/platform/java/mupdf_native.h b/platform/java/mupdf_native.h
index 2065f93e..3c7f3570 100644
--- a/platform/java/mupdf_native.h
+++ b/platform/java/mupdf_native.h
@@ -623,6 +623,14 @@ JNIEXPORT jobject JNICALL Java_com_artifex_mupdf_fitz_Document_openNativeWithBuf
/*
* Class: com_artifex_mupdf_fitz_Document
+ * Method: openNativeWithStream
+ * Signature: (Lcom/artifex/mupdf/fitz/SeekableInputStream;Ljava/lang/String;)Lcom/artifex/mupdf/fitz/Document;
+ */
+JNIEXPORT jobject JNICALL Java_com_artifex_mupdf_fitz_Document_openNativeWithStream
+ (JNIEnv *, jclass, jobject, jstring);
+
+/*
+ * Class: com_artifex_mupdf_fitz_Document
* Method: recognize
* Signature: (Ljava/lang/String;)Z
*/
@@ -863,6 +871,17 @@ JNIEXPORT jlong JNICALL Java_com_artifex_mupdf_fitz_DrawDevice_newNative
}
#endif
#endif
+/* Header for class com_artifex_mupdf_fitz_FileStream */
+
+#ifndef _Included_com_artifex_mupdf_fitz_FileStream
+#define _Included_com_artifex_mupdf_fitz_FileStream
+#ifdef __cplusplus
+extern "C" {
+#endif
+#ifdef __cplusplus
+}
+#endif
+#endif
/* Header for class com_artifex_mupdf_fitz_Font */
#ifndef _Included_com_artifex_mupdf_fitz_Font
@@ -1899,6 +1918,14 @@ JNIEXPORT jboolean JNICALL Java_com_artifex_mupdf_fitz_PDFDocument_canBeSavedInc
JNIEXPORT jint JNICALL Java_com_artifex_mupdf_fitz_PDFDocument_save
(JNIEnv *, jobject, jstring, jstring);
+/*
+ * Class: com_artifex_mupdf_fitz_PDFDocument
+ * Method: saveWithStream
+ * Signature: (Lcom/artifex/mupdf/fitz/SeekableOutputStream;Ljava/lang/String;)I
+ */
+JNIEXPORT jint JNICALL Java_com_artifex_mupdf_fitz_PDFDocument_saveWithStream
+ (JNIEnv *, jobject, jobject, jstring);
+
#ifdef __cplusplus
}
#endif
@@ -2845,6 +2872,45 @@ extern "C" {
}
#endif
#endif
+/* Header for class com_artifex_mupdf_fitz_SeekableInputStream */
+
+#ifndef _Included_com_artifex_mupdf_fitz_SeekableInputStream
+#define _Included_com_artifex_mupdf_fitz_SeekableInputStream
+#ifdef __cplusplus
+extern "C" {
+#endif
+#ifdef __cplusplus
+}
+#endif
+#endif
+/* Header for class com_artifex_mupdf_fitz_SeekableOutputStream */
+
+#ifndef _Included_com_artifex_mupdf_fitz_SeekableOutputStream
+#define _Included_com_artifex_mupdf_fitz_SeekableOutputStream
+#ifdef __cplusplus
+extern "C" {
+#endif
+#ifdef __cplusplus
+}
+#endif
+#endif
+/* Header for class com_artifex_mupdf_fitz_SeekableStream */
+
+#ifndef _Included_com_artifex_mupdf_fitz_SeekableStream
+#define _Included_com_artifex_mupdf_fitz_SeekableStream
+#ifdef __cplusplus
+extern "C" {
+#endif
+#undef com_artifex_mupdf_fitz_SeekableStream_SEEK_SET
+#define com_artifex_mupdf_fitz_SeekableStream_SEEK_SET 0L
+#undef com_artifex_mupdf_fitz_SeekableStream_SEEK_CUR
+#define com_artifex_mupdf_fitz_SeekableStream_SEEK_CUR 1L
+#undef com_artifex_mupdf_fitz_SeekableStream_SEEK_END
+#define com_artifex_mupdf_fitz_SeekableStream_SEEK_END 2L
+#ifdef __cplusplus
+}
+#endif
+#endif
/* Header for class com_artifex_mupdf_fitz_Separation */
#ifndef _Included_com_artifex_mupdf_fitz_Separation