private void dumpUtf16LE() throws SAXException, TikaException {
        try {
            oneNoteDirectFileResource.position(0);
            UnsynchronizedByteArrayOutputStream os = UnsynchronizedByteArrayOutputStream.builder().get();
            long sz = oneNoteDirectFileResource.size();
            long bufSize = BUFFER_SIZE;
            // Make sure the buffer size is a multiple of 2.
            if (bufSize % 2 == 1) {
                bufSize += 1L;
            }

            long pos;
            while ((pos = oneNoteDirectFileResource.position()) != sz) {
                long nextBufferSize = bufSize;
                if (sz - pos < bufSize) {
                    nextBufferSize = sz - pos;
                }
                ByteBuffer byteBuffer = ByteBuffer.allocate((int) nextBufferSize);
                oneNoteDirectFileResource.read(byteBuffer);
                for (long i = 0; i < nextBufferSize - 1; i++) {
                    int c1 = byteBuffer.get((int) i) & 0xff;
                    int c2 = byteBuffer.get((int) i + 1);

                    if (c2 == 0x00 && c1 >= 0x20) { // add this back? && c1 < 0x7F) {
                        ++i;
                        os.write(c1);
                    } 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 UTF16 LE 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