public static void writeString(COSString string, OutputStream output) throws IOException {
        writeString(string.getBytes(), string.getForceHexForm(), output);
    }
This will output the given byte getString as a PDF object.

@param string COSString to be written
@param output The stream to write to.
@throws IOException If there is an error writing to the stream.
tika-fuzzing/src/main/java/org/apache/tika/fuzzing/pdf/EvilCOSWriter.java