summaryrefslogtreecommitdiff
path: root/platform/java/src/com/artifex
diff options
context:
space:
mode:
authorSebastian Rasmussen <sebras@gmail.com>2016-07-20 23:18:31 +0800
committerSebastian Rasmussen <sebras@gmail.com>2016-07-20 23:20:25 +0800
commit25929104fb420c8237d337f008e5a91b7767e111 (patch)
tree8c05c15a04048a68a702a45fe77b5a6d27415efe /platform/java/src/com/artifex
parentaa2fc75fdcc68e27d5dffbd057993c0f277ccc9a (diff)
downloadmupdf-25929104fb420c8237d337f008e5a91b7767e111.tar.xz
JNI: Declare methods for internal use private.
Diffstat (limited to 'platform/java/src/com/artifex')
-rw-r--r--platform/java/src/com/artifex/mupdf/fitz/PDFDocument.java15
-rw-r--r--platform/java/src/com/artifex/mupdf/fitz/PDFObject.java41
2 files changed, 28 insertions, 28 deletions
diff --git a/platform/java/src/com/artifex/mupdf/fitz/PDFDocument.java b/platform/java/src/com/artifex/mupdf/fitz/PDFDocument.java
index c049d336..dc6b2f8f 100644
--- a/platform/java/src/com/artifex/mupdf/fitz/PDFDocument.java
+++ b/platform/java/src/com/artifex/mupdf/fitz/PDFDocument.java
@@ -41,8 +41,12 @@ public class PDFDocument
public native PDFObject createObject();
public native void deleteObject(int i);
- public native PDFObject addStreamBuffer(Buffer buf);
- public native PDFObject addStreamString(String str);
+ public void deleteObject(PDFObject obj) {
+ deleteObject(obj.toIndirect());
+ }
+
+ private native PDFObject addStreamBuffer(Buffer buf);
+ private native PDFObject addStreamString(String str);
public PDFObject addStream(Buffer buf) {
return addStreamBuffer(buf);
@@ -52,8 +56,8 @@ public class PDFDocument
return addStreamString(str);
}
- public native PDFObject addPageBuffer(Rect mediabox, int rotate, PDFObject resources, Buffer contents);
- public native PDFObject addPageString(Rect mediabox, int rotate, PDFObject resources, String contents);
+ private native PDFObject addPageBuffer(Rect mediabox, int rotate, PDFObject resources, Buffer contents);
+ private native PDFObject addPageString(Rect mediabox, int rotate, PDFObject resources, String contents);
public PDFObject addPage(Rect mediabox, int rotate, PDFObject resources, Buffer contents) {
return addPageBuffer(mediabox, rotate, resources, contents);
@@ -70,7 +74,4 @@ public class PDFDocument
public native PDFObject addFont(Font font);
public native void save(String filename, String options);
- public void deleteObject(PDFObject obj) {
- deleteObject(obj.toIndirect());
- }
}
diff --git a/platform/java/src/com/artifex/mupdf/fitz/PDFObject.java b/platform/java/src/com/artifex/mupdf/fitz/PDFObject.java
index f2e926f2..90575582 100644
--- a/platform/java/src/com/artifex/mupdf/fitz/PDFObject.java
+++ b/platform/java/src/com/artifex/mupdf/fitz/PDFObject.java
@@ -47,8 +47,8 @@ public class PDFObject
public native byte[] readStream();
public native byte[] readRawStream();
- public native PDFObject getArray(int index);
- public native PDFObject getDictionary(String name);
+ private native PDFObject getArray(int index);
+ private native PDFObject getDictionary(String name);
public PDFObject get(int index) {
return getArray(index);
@@ -58,24 +58,23 @@ public class PDFObject
return getDictionary(name);
}
- public native void putArrayBoolean(int index, boolean b);
- public native void putArrayInteger(int index, int i);
- public native void putArrayFloat(int index, float f);
- public native void putArrayString(int index, String str);
- public native void putArrayPDFObject(int index, PDFObject obj);
+ private native void putArrayBoolean(int index, boolean b);
+ private native void putArrayInteger(int index, int i);
+ private native void putArrayFloat(int index, float f);
+ private native void putArrayString(int index, String str);
+ private native void putArrayPDFObject(int index, PDFObject obj);
- public native void putDictionaryStringBoolean(String name, boolean b);
- public native void putDictionaryStringInteger(String name, int i);
- public native void putDictionaryStringFloat(String name, float f);
- public native void putDictionaryStringString(String name, String str);
- public native void putDictionaryStringPDFObject(String name, PDFObject obj);
-
- public native void putDictionaryPDFObjectBoolean(PDFObject name, boolean b);
- public native void putDictionaryPDFObjectInteger(PDFObject name, int i);
- public native void putDictionaryPDFObjectFloat(PDFObject name, float f);
- public native void putDictionaryPDFObjectString(PDFObject name, String str);
- public native void putDictionaryPDFObjectPDFObject(PDFObject name, PDFObject obj);
+ private native void putDictionaryStringBoolean(String name, boolean b);
+ private native void putDictionaryStringInteger(String name, int i);
+ private native void putDictionaryStringFloat(String name, float f);
+ private native void putDictionaryStringString(String name, String str);
+ private native void putDictionaryStringPDFObject(String name, PDFObject obj);
+ private native void putDictionaryPDFObjectBoolean(PDFObject name, boolean b);
+ private native void putDictionaryPDFObjectInteger(PDFObject name, int i);
+ private native void putDictionaryPDFObjectFloat(PDFObject name, float f);
+ private native void putDictionaryPDFObjectString(PDFObject name, String str);
+ private native void putDictionaryPDFObjectPDFObject(PDFObject name, PDFObject obj);
public void put(int index, boolean b) {
putArrayBoolean(index, b);
@@ -137,9 +136,9 @@ public class PDFObject
putDictionaryPDFObjectPDFObject(name, obj);
}
- public native void deleteArray(int index);
- public native void deleteDictionaryString(String name);
- public native void deleteDictionaryPDFObject(PDFObject name);
+ private native void deleteArray(int index);
+ private native void deleteDictionaryString(String name);
+ private native void deleteDictionaryPDFObject(PDFObject name);
public void delete(int index) {
deleteArray(index);