private void dumpAscii() throws SAXException, TikaException {
        try {
            oneNoteDirectFileResource.position(0);
            UnsynchronizedByteArrayOutputStream os = UnsynchronizedByteArrayOutputStream.builder().get();
            long sz = oneNoteDirectFileResource.size();
            long pos;
            while ((pos = oneNoteDirectFileResource.position()) != sz) {
                long nextBufferSize = BUFFER_SIZE;
                if (sz - pos < BUFFER_SIZE) {
                    nextBufferSize = sz - pos;
                }
                ByteBuffer byteBuffer = ByteBuffer.allocate((int) nextBufferSize);
                oneNoteDirectFileResource.read(byteBuffer);
                for (long i = 0; i < nextBufferSize - 1; ++i) {
                    int b = byteBuffer.get((int) i);
                    if (b >= 0x20 && b < 0x7F) {
                        os.write(b);
                    } else {
                        if (os.size() >= MIN_STRING_LENGTH) {
                            writeIfUseful(os);
                        }
                        os.reset();
                    }
                }
                if (os.size() >= MIN_STRING_LENGTH) {
                    writeIfUseful(os);
                }
            }
        } catch (IOException e) {
            throw new TikaException("Could not extract text from legacy OneNote document", e);
        }
    }
Based on GNU "strings" implementation. Pulls out ascii text segments and writes them to
the XHTMLContentHandler.
tika-parsers/tika-parsers-standard/tika-parsers-standard-modules/tika-parser-microsoft-module/src/main/java/org/apache/tika/parser/microsoft/onenote/OneNoteLegacyDumpStrings.java