Package com.tom_roush.pdfbox.cos
Class COSFloat
- java.lang.Object
-
- com.tom_roush.pdfbox.cos.COSBase
-
- com.tom_roush.pdfbox.cos.COSNumber
-
- com.tom_roush.pdfbox.cos.COSFloat
-
- All Implemented Interfaces:
COSObjectable
public class COSFloat extends COSNumber
This class represents a floating point number in a PDF document.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description Objectaccept(ICOSVisitor visitor)Visitor pattern double dispatch method.doubledoubleValue()Deprecated.will be removed in a future releasebooleanequals(Object o)floatfloatValue()The value of the float object that this one wraps.inthashCode()intintValue()This will get the integer value of this object.longlongValue()This will get the long value of this object.StringtoString()voidwritePDF(OutputStream output)This will output this string as a PDF object.-
Methods inherited from class com.tom_roush.pdfbox.cos.COSBase
getCOSObject, isDirect, setDirect
-
-
-
-
Constructor Detail
-
COSFloat
public COSFloat(float aFloat)
Constructor.- Parameters:
aFloat- The primitive float object that this object wraps.
-
COSFloat
public COSFloat(String aFloat) throws IOException
Constructor.- Parameters:
aFloat- The primitive float object that this object wraps.- Throws:
IOException- If aFloat is not a float.
-
-
Method Detail
-
floatValue
public float floatValue()
The value of the float object that this one wraps.- Specified by:
floatValuein classCOSNumber- Returns:
- The value of this object.
-
doubleValue
public double doubleValue()
Deprecated.will be removed in a future releaseThe value of the double object that this one wraps.- Specified by:
doubleValuein classCOSNumber- Returns:
- The double of this object.
-
longValue
public long longValue()
This will get the long value of this object.
-
intValue
public int intValue()
This will get the integer value of this object.
-
accept
public Object accept(ICOSVisitor visitor) throws IOException
Visitor pattern double dispatch method.- Specified by:
acceptin classCOSBase- Parameters:
visitor- The object to notify when visiting this object.- Returns:
- any object, depending on the visitor implementation, or null
- Throws:
IOException- If an error occurs while visiting this object.
-
writePDF
public void writePDF(OutputStream output) throws IOException
This will output this string as a PDF object.- Parameters:
output- The stream to write to.- Throws:
IOException- If there is an error writing to the stream.
-
-