Class PdfValue

  • All Implemented Interfaces:

    
    public final class PdfValue
    
                        

    This represents a value stored inside a PDF document stream. The PDF has a few different data types of values that are reasonably interchangeable. The type can be retrieved with getType and can be one of PdfValueType.

    When creating a new value, the type will be automatically set depending on the constructor parameter.

    • Constructor Detail

      • PdfValue

        PdfValue(long longValue)
        Creates a new PDF value of INTEGER type.
      • PdfValue

        PdfValue(double doubleValue)
        Creates a new PDF value of DOUBLE type.
      • PdfValue

        PdfValue(boolean booleanValue)
        Creates a new PDF value of BOOLEAN type.
      • PdfValue

        PdfValue(String stringValue)
        Creates a new PDF value of STRING type.
      • PdfValue

        PdfValue()
        Creates a new PDF value of NULLOBJ type.
    • Method Detail

      • getLong

         long getLong()

        Gets the stored Long value or 0 if the value isn't an integer.

        Returns:

        Stored integer value or 0 if the value isn't an integer.

      • getDouble

         double getDouble()

        Gets the stored Double value or 0.0 if the value isn't a double.

        Returns:

        Stored double value or 0.0 if the value isn't a double.

      • getBoolean

         boolean getBoolean()

        Gets the stored Boolean value or false if the value isn't a boolean.

        Returns:

        Stored boolean value or false if the value isn't a boolean.

      • getString

         String getString()

        Gets the stored String value or null if the value isn't a string.

        Returns:

        Stored string value or null if the value isn't a string.

      • getArray

         List<PdfValue> getArray()

        Gets the stored List of PdfValues or null if the value isn't an array.

        Returns:

        Stored list or null if the value isn't an array.