public final class COSUtils extends Object
| Modifier and Type | Method and Description |
|---|---|
static void |
closeDocumentQuietly(org.apache.pdfbox.cos.COSDocument document)
Close the given Document.
|
static void |
closeDocumentQuietly(org.apache.pdfbox.pdmodel.PDDocument document)
Close the given Document.
|
static org.apache.pdfbox.cos.COSArray |
getAsArray(org.apache.pdfbox.cos.COSBase cbase,
org.apache.pdfbox.cos.COSDocument cDoc)
Return the COSBase object as COSArray if the COSBase object is an instance of COSArray or a reference to a
COSArray object.
|
static org.apache.pdfbox.cos.COSDictionary |
getAsDictionary(org.apache.pdfbox.cos.COSBase cbase,
org.apache.pdfbox.cos.COSDocument cDoc)
Return the COSBase object as COSDictionary if the COSBase object is an instance of COSDictionary or a reference
to a COSDictionary object.
|
static Float |
getAsFloat(org.apache.pdfbox.cos.COSBase cbase,
org.apache.pdfbox.cos.COSDocument cDoc)
Return the COSBase object as Float if the COSBase object is an instance of COSFloat or a reference to a COSFloat
object.
|
static Integer |
getAsInteger(org.apache.pdfbox.cos.COSBase cbase,
org.apache.pdfbox.cos.COSDocument cDoc)
Return the COSBase object as Integer if the COSBase object is an instance of COSInteger or a reference to a
COSInteger object.
|
static org.apache.pdfbox.cos.COSStream |
getAsStream(org.apache.pdfbox.cos.COSBase cbase,
org.apache.pdfbox.cos.COSDocument cDoc)
Return the COSBase object as COSStream if the COSBase object is an instance of COSStream or a reference to a
COSStream object.
|
static String |
getAsString(org.apache.pdfbox.cos.COSBase cbase,
org.apache.pdfbox.cos.COSDocument cDoc)
Return the COSBase object as String if the COSBase object is an instance of COSString or
COSName or a reference to it.
|
static boolean |
isArray(org.apache.pdfbox.cos.COSBase elt,
org.apache.pdfbox.cos.COSDocument doc)
return true if the elt is a COSArray or a reference to a COSArray
|
static boolean |
isDictionary(org.apache.pdfbox.cos.COSBase elt,
org.apache.pdfbox.cos.COSDocument doc)
return true if the elt is a COSDictionary or a reference to a COSDictionary
|
static boolean |
isFloat(org.apache.pdfbox.cos.COSBase elt,
org.apache.pdfbox.cos.COSDocument doc)
return true if the elt is a COSFloat or a reference to a COSFloat
|
static boolean |
isInteger(org.apache.pdfbox.cos.COSBase elt,
org.apache.pdfbox.cos.COSDocument doc)
return true if the elt is a COSInteger or a reference to a COSInteger
|
static boolean |
isNumeric(org.apache.pdfbox.cos.COSBase elt,
org.apache.pdfbox.cos.COSDocument doc)
return true if elt is COSInteger or COSFloat
|
static boolean |
isStream(org.apache.pdfbox.cos.COSBase elt,
org.apache.pdfbox.cos.COSDocument doc)
return true if the elt is a COSStream or a reference to a COSStream
|
static boolean |
isString(org.apache.pdfbox.cos.COSBase elt,
org.apache.pdfbox.cos.COSDocument doc)
return true if the elt is a COSString or a COSName or a reference to it.
|
public static boolean isDictionary(org.apache.pdfbox.cos.COSBase elt,
org.apache.pdfbox.cos.COSDocument doc)
elt - the object to check.doc - the document.public static boolean isString(org.apache.pdfbox.cos.COSBase elt,
org.apache.pdfbox.cos.COSDocument doc)
elt - the object to check.doc - the document.public static boolean isStream(org.apache.pdfbox.cos.COSBase elt,
org.apache.pdfbox.cos.COSDocument doc)
elt - the object to check.doc - the document.public static boolean isInteger(org.apache.pdfbox.cos.COSBase elt,
org.apache.pdfbox.cos.COSDocument doc)
elt - the object to check.doc - the document.public static boolean isNumeric(org.apache.pdfbox.cos.COSBase elt,
org.apache.pdfbox.cos.COSDocument doc)
elt - the object to check.doc - the document.public static boolean isFloat(org.apache.pdfbox.cos.COSBase elt,
org.apache.pdfbox.cos.COSDocument doc)
elt - the object to check.doc - the document.public static boolean isArray(org.apache.pdfbox.cos.COSBase elt,
org.apache.pdfbox.cos.COSDocument doc)
elt - the object to check.doc - the document.public static org.apache.pdfbox.cos.COSArray getAsArray(org.apache.pdfbox.cos.COSBase cbase,
org.apache.pdfbox.cos.COSDocument cDoc)
cbase - the object to get.cDoc - the document.public static String getAsString(org.apache.pdfbox.cos.COSBase cbase, org.apache.pdfbox.cos.COSDocument cDoc)
cbase - the object to get.cDoc - the document.public static org.apache.pdfbox.cos.COSDictionary getAsDictionary(org.apache.pdfbox.cos.COSBase cbase,
org.apache.pdfbox.cos.COSDocument cDoc)
cbase - the object to get.cDoc - the document.public static org.apache.pdfbox.cos.COSStream getAsStream(org.apache.pdfbox.cos.COSBase cbase,
org.apache.pdfbox.cos.COSDocument cDoc)
cbase - the object to get.cDoc - the document.public static Float getAsFloat(org.apache.pdfbox.cos.COSBase cbase, org.apache.pdfbox.cos.COSDocument cDoc)
cbase - the object to get.cDoc - the document.public static Integer getAsInteger(org.apache.pdfbox.cos.COSBase cbase, org.apache.pdfbox.cos.COSDocument cDoc)
cbase - the object to get.cDoc - the document.public static void closeDocumentQuietly(org.apache.pdfbox.cos.COSDocument document)
document - the document.public static void closeDocumentQuietly(org.apache.pdfbox.pdmodel.PDDocument document)
document - the document.Copyright © 2002–2025 The Apache Software Foundation. All rights reserved.