Class 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 Detail

      • COSNumber

        public COSNumber()
    • 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.". Chooses COSInteger when the token has no fractional part or exponent, COSFloat otherwise.
        Throws:
        COSException