@Override
    public void visitFromArray(COSArray obj) throws IOException {
        int count = 0;
        getStandardOutput().write(ARRAY_OPEN);
        for (Iterator<COSBase> i = obj.iterator(); i.hasNext(); ) {
            COSBase current = i.next();
            if (current instanceof COSDictionary) {
                if (current.isDirect()) {
                    visitFromDictionary((COSDictionary) current);
                } else {
                    addObjectToWrite(current);
                    writeReference(current);
                }
            } else if (current instanceof COSObject) {
                COSBase subValue = ((COSObject) current).getObject();
                if (willEncrypt || incrementalUpdate || subValue instanceof COSDictionary ||
                        subValue == null) {
                    // PDFBOX-4308: added willEncrypt to prevent an object
                    // that is referenced several times from being written
                    // direct and indirect, thus getting encrypted
                    // with wrong object number or getting encrypted twice
                    addObjectToWrite(current);
                    writeReference(current);
                } else {
                    subValue.accept(this);
                }
            } else if (current == null) {
                COSNull.NULL.accept(this);
            } else {
                current.accept(this);
            }
            count++;
            if (i.hasNext()) {
                if (count % 10 == 0) {
                    getStandardOutput().writeEOL();
                } else {
                    getStandardOutput().write(SPACE);
                }
            }
        }
        getStandardOutput().write(ARRAY_CLOSE);
        getStandardOutput().writeEOL();
    }
This will get the object key for the object.

@param obj The object to get the key for.
@return The object key for the object.
tika-fuzzing/src/main/java/org/apache/tika/fuzzing/pdf/EvilCOSWriter.java