Top Description Constructors Methods
org.apache.pdfbox.cos

public abstract Class COSNumber

extends COSBase
Class Inheritance
Known Direct Subclasses
org.apache.pdfbox.cos.COSFloat, org.apache.pdfbox.cos.COSInteger
Imports
java.io.IOException

This class represents an abstract number in a PDF document.
Author
Ben Litchfield

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public abstract float

Returns:

The float value of this object.
floatValue
()

This will get the float value of this number.

public static COSNumber

Returns:

A number object, either float or int.
get
(String
The string representation of the number.
number
)

This factory method will get the appropriate number object.

public abstract int

Returns:

The integer value of this number.
intValue
()

This will get the integer value of this number.

private static boolean
isFloat(String number)

public abstract long

Returns:

The long value of this number.
longValue
()

This will get the long value of this number.

Inherited from org.apache.pdfbox.cos.COSBase:
acceptgetCOSObjectgetKeyisDirectsetDirectsetKey

Constructor Detail

COSNumberback to summary
public COSNumber()

Method Detail

floatValueback to summary
public abstract float floatValue()

This will get the float value of this number.

Returns:float

The float value of this object.

getback to summary
public static COSNumber get(String number) throws IOException

This factory method will get the appropriate number object.

Parameters
number:String

The string representation of the number.

Returns:COSNumber

A number object, either float or int.

Exceptions
IOException:
If the string is not a number.
intValueback to summary
public abstract int intValue()

This will get the integer value of this number.

Returns:int

The integer value of this number.

isFloatback to summary
private static boolean isFloat(String number)
longValueback to summary
public abstract long longValue()

This will get the long value of this number.

Returns:long

The long value of this number.