Package org.apache.pdfbox.cos
Class COSBoolean
java.lang.Object
org.apache.pdfbox.cos.COSBase
org.apache.pdfbox.cos.COSBoolean
- All Implemented Interfaces:
COSObjectable
This class represents a boolean value in the PDF document.
- Version:
- $Revision: 1.14 $
- Author:
- Ben Litchfield
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final COSBoolean
The PDF false value.static final byte[]
The false boolean token.static final COSBoolean
The PDF true value.static final byte[]
The true boolean token. -
Method Summary
Modifier and TypeMethodDescriptionaccept
(ICOSVisitor visitor) visitor pattern double dispatch method.static COSBoolean
getBoolean
(boolean value) This will get the boolean value.static COSBoolean
getBoolean
(Boolean value) This will get the boolean value.boolean
getValue()
This will get the value that this object wraps.This will get the value that this object wraps.toString()
Return a string representation of this object.void
writePDF
(OutputStream output) This will write this object out to a PDF stream.Methods inherited from class org.apache.pdfbox.cos.COSBase
getCOSObject, getFilterManager, isDirect, isNeedToBeUpdate, setDirect, setNeedToBeUpdate
-
Field Details
-
TRUE_BYTES
public static final byte[] TRUE_BYTESThe true boolean token. -
FALSE_BYTES
public static final byte[] FALSE_BYTESThe false boolean token. -
TRUE
The PDF true value. -
FALSE
The PDF false value.
-
-
Method Details
-
getValue
public boolean getValue()This will get the value that this object wraps.- Returns:
- The boolean value of this object.
-
getValueAsObject
This will get the value that this object wraps.- Returns:
- The boolean value of this object.
-
getBoolean
This will get the boolean value.- Parameters:
value
- Parameter telling which boolean value to get.- Returns:
- The single boolean instance that matches the parameter.
-
getBoolean
This will get the boolean value.- Parameters:
value
- Parameter telling which boolean value to get.- Returns:
- The single boolean instance that matches the parameter.
-
accept
visitor pattern double dispatch method.- Specified by:
accept
in classCOSBase
- Parameters:
visitor
- The object to notify when visiting this object.- Returns:
- any object, depending on the visitor implementation, or null
- Throws:
COSVisitorException
- If an error occurs while visiting this object.
-
toString
Return a string representation of this object. -
writePDF
This will write this object out to a PDF stream.- Parameters:
output
- The stream to write this object out to.- Throws:
IOException
- If an error occurs while writing out this object.
-