public void doWriteObject( COSBase obj ) throws IOException {
        writtenObjects.add( obj );
        // find the physical reference
        currentObjectKey = getObjectKey( obj );
        doWriteObject(currentObjectKey, obj);
    }
This will write the body of the document.

@param doc The document to write the body for.
@throws IOException If there is an error writing the data.
tika-fuzzing/src/main/java/org/apache/tika/fuzzing/pdf/EvilCOSWriter.java