Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.pdfbox.cos
Class COSBoolean

    java.lang.Object
      org.pdfbox.cos.COSBase
          org.pdfbox.cos.COSBoolean

All Implemented Interfaces:
  COSObjectable

public class COSBoolean
extends COSBase

This class represents a boolean value in the PDF document.

Version:
  $Revision: 1.13 $
Author:
  Ben Litchfield (ben@csh.rit.edu)

Field Summary
`static COSBoolean` | `FALSE` The PDF false value.
`static byte[]` | `FALSE_BYTES` The false boolean token.
`static COSBoolean` | `TRUE` The PDF true value.
`static byte[]` | `TRUE_BYTES` The true boolean token.

Method Summary
`Object` | `accept(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.
`Boolean` | `getValueAsObject()` This will get the value that this object wraps.
`String` | `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.pdfbox.cos.COSBase
`getCOSObject, getFilterManager`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Field Detail

### TRUE_BYTES

    public static final byte[] TRUE_BYTES

  The true boolean token.

### FALSE_BYTES

    public static final byte[] FALSE_BYTES

  The false boolean token.

### TRUE

    public static final COSBoolean TRUE

  The PDF true value.

### FALSE

    public static final COSBoolean FALSE

  The PDF false value.

Method Detail

### getValue

    public boolean getValue()

  This will get the value that this object wraps.

  Returns:
    The boolean value of this object.

### getValueAsObject

    public Boolean getValueAsObject()

  This will get the value that this object wraps.

  Returns:
    The boolean value of this object.

### getBoolean

    public static COSBoolean getBoolean(boolean value)

  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

    public static COSBoolean getBoolean(Boolean value)

  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

    public Object accept(ICOSVisitor visitor)
                  throws COSVisitorException

  visitor pattern double dispatch method.

  Specified by:
    `accept` in class `COSBase`
  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

    public String toString()

  Return a string representation of this object.

  Returns:
    The string value of this object.

### writePDF

    public void writePDF(OutputStream output)
                  throws IOException

  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.

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD