Package com.pd4ml.pdf.cos
Class COSNumber
- java.lang.Object
-
- com.pd4ml.pdf.cos.COSBase
-
- com.pd4ml.pdf.cos.COSNumber
-
- All Implemented Interfaces:
COSObjectable
- Direct Known Subclasses:
COSFloat,COSInteger
public abstract class COSNumber extends COSBase
Base class for the two PDF numeric object types, integers and reals.
-
-
Constructor Summary
Constructors Constructor Description COSNumber()
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract doubledoubleValue()abstract floatfloatValue()static COSNumberget(java.lang.String token)Parses a numeric token exactly as it would appear in PDF content, e.g.abstract intintValue()abstract longlongValue()-
Methods inherited from class com.pd4ml.pdf.cos.COSBase
accept, getCOSObject, getGenerationNumber, getKey, getObjectNumber, isDirect, resolve, setKey
-
-
-
-
Method Detail
-
floatValue
public abstract float floatValue()
-
doubleValue
public abstract double doubleValue()
-
longValue
public abstract long longValue()
-
intValue
public abstract int intValue()
-
get
public static COSNumber get(java.lang.String token) throws COSException
Parses a numeric token exactly as it would appear in PDF content, e.g."12","-3.14","+.5","4.". ChoosesCOSIntegerwhen the token has no fractional part or exponent,COSFloatotherwise.- Throws:
COSException
-
-