private COSBase getFilters(COSBase existingFilters) {
        List<COSName> filters = config.getFilters(existingFilters);
        if (filters.size() == 0) {
            return COSNull.NULL;
        } else if (filters.size() == 1) {
            return filters.get(0);
        } else {
            COSArray arr = new COSArray();
            for (COSName n : filters) {
                arr.add(n);
            }
            return arr;
        }
    }
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