Class ASNumber
java.lang.Object
com.adobe.internal.pdftoolkit.core.types.ASObject
com.adobe.internal.pdftoolkit.core.types.ASNumber
ASNumber encapulates a number while maintaining the underlying textual
representation for the value. That is, it does not convert the string
to a value until asked to do so.
-
Constructor Summary
ConstructorsConstructorDescriptionASNumber(double value) Constructor.ASNumber(float value) Constructor.ASNumber(int value) Constructor.ASNumber(long value) Constructor.Constructor.Constructor which creates a number from string value passed in proper number format.Constructor.Constructor.Constructor.Constructor which creates a number from string value passed in proper number format. -
Method Summary
Modifier and TypeMethodDescriptionstatic StringdoubleToString(double value) Converts the double value passed here to an string and returns it.doubleReturns double value of this number.floatReturns float value of this number.intintValue()Returns integer value of this number.longReturns long value of this number.Returns this number.strValue()Returns string representation of this number object.toString()voidwrite(OutputByteStream outputByteStream) Writes the ASHexString in to the given OutputStream in the format expected by the PDF Spec.
-
Constructor Details
-
ASNumber
Constructor which creates a number from string value passed in proper number format.- Throws:
PDFParseException
-
ASNumber
Constructor which creates a number from string value passed in proper number format.- Throws:
PDFParseException
-
ASNumber
Constructor. -
ASNumber
Constructor. -
ASNumber
Constructor. -
ASNumber
Constructor. -
ASNumber
public ASNumber(int value) Constructor. -
ASNumber
public ASNumber(long value) Constructor. -
ASNumber
public ASNumber(float value) Constructor. -
ASNumber
public ASNumber(double value) Constructor.
-
-
Method Details
-
strValue
Returns string representation of this number object. -
toString
-
intValue
public int intValue()Returns integer value of this number. -
longValue
public long longValue()Returns long value of this number. -
floatValue
public float floatValue()Returns float value of this number. -
doubleValue
public double doubleValue()Returns double value of this number. -
numberValue
Returns this number. -
doubleToString
Converts the double value passed here to an string and returns it. -
write
Writes the ASHexString in to the given OutputStream in the format expected by the PDF Spec.- Specified by:
writein classASObject- Parameters:
outputByteStream- OutputByteStream to write to.- Throws:
PDFIOException- See Also:
-