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