summaryrefslogtreecommitdiff
path: root/platform/java/src/com
diff options
context:
space:
mode:
Diffstat (limited to 'platform/java/src/com')
-rw-r--r--platform/java/src/com/artifex/mupdf/fitz/PDFDocument.java2
-rw-r--r--platform/java/src/com/artifex/mupdf/fitz/PDFObject.java18
2 files changed, 14 insertions, 6 deletions
diff --git a/platform/java/src/com/artifex/mupdf/fitz/PDFDocument.java b/platform/java/src/com/artifex/mupdf/fitz/PDFDocument.java
index 93fd5ebe..601919d7 100644
--- a/platform/java/src/com/artifex/mupdf/fitz/PDFDocument.java
+++ b/platform/java/src/com/artifex/mupdf/fitz/PDFDocument.java
@@ -42,7 +42,7 @@ public class PDFDocument
public native void deleteObject(int i);
public void deleteObject(PDFObject obj) {
- deleteObject(obj.toIndirect());
+ deleteObject(obj.asIndirect());
}
public native PDFGraftMap newPDFGraftMap();
diff --git a/platform/java/src/com/artifex/mupdf/fitz/PDFObject.java b/platform/java/src/com/artifex/mupdf/fitz/PDFObject.java
index 10a0e7a8..0f9741b5 100644
--- a/platform/java/src/com/artifex/mupdf/fitz/PDFObject.java
+++ b/platform/java/src/com/artifex/mupdf/fitz/PDFObject.java
@@ -19,6 +19,8 @@ public class PDFObject
pointer = p;
}
+ private static native long newNull();
+
public native boolean isIndirect();
public native boolean isNull();
public native boolean isBoolean();
@@ -31,11 +33,15 @@ public class PDFObject
public native boolean isDictionary();
public native boolean isStream();
- public native boolean toBoolean();
- public native int toInteger();
- public native float toFloat();
- public native byte[] toByteString();
- public native int toIndirect();
+ public native boolean asBoolean();
+ public native int asInteger();
+ public native float asFloat();
+ public native int asIndirect();
+ public native String asName();
+ public native byte[] asByteName();
+ public native String asString();
+ public native byte[] asByteString();
+
public native String toString(boolean tight);
public String toString() {
@@ -201,4 +207,6 @@ public class PDFObject
public void push(PDFObject obj) {
pushPDFObject(obj);
}
+
+ public static final PDFObject Null = new PDFObject(newNull());
}