org.apache.pdfbox.cos

## Class COSNull

- java.lang.Object
- - org.apache.pdfbox.cos.COSBase
  - - org.apache.pdfbox.cos.COSNull

All Implemented Interfaces:
  COSObjectable

    public final class COSNull
    extends COSBase

This class represents a null PDF object.

Author:
  Ben Litchfield

### Field Summary

Fields
`static COSNull` `NULL` The one null object in the system.
`static byte[]` `NULL_BYTES` The null token.

### Method Summary

All Methods Instance Methods Concrete Methods
`void` `accept(ICOSVisitor visitor)` Visitor pattern double dispatch method.
`String` `toString()`
`void` `writePDF(OutputStream output)` This will output this string as a PDF object.

### Methods inherited from class org.apache.pdfbox.cos.COSBase

`getCOSObject, getKey, isDirect, setDirect, setKey`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

### Field Detail

#### NULL_BYTES

    public static final byte[] NULL_BYTES

The null token.

#### NULL

    public static final COSNull NULL

The one null object in the system.

### Method Detail

#### accept

    public void accept(ICOSVisitor visitor)
                throws IOException

Visitor pattern double dispatch method.

Specified by:
  `accept` in class `COSBase`
Parameters:
  `visitor` - The object to notify when visiting this object.
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.

#### toString

    public String toString()

Overrides:
  `toString` in class `Object`