@Override
    public List<LeafNodeObject> chunking() throws IOException {
        int horizon = 16384;
        List<LeafNodeObject> list = new ArrayList<>();
        int inputLength = fileContent.length;

        if (inputLength <= 0) {
            throw new IOException("Cannot support the length less than 0");
        } else if (inputLength <= horizon) {
            list.add(this.getChunk(0, inputLength));
            return list;
        }

        long chunkStart = 0;
        UInteger[] hashValues = this.getHashValues();

        while (chunkStart + 1 < inputLength) {
            long chunkEndMax = Math.min(chunkStart + this.maxChunkSize, inputLength);
            long chunkEnd = (int) chunkEndMax;

            for (long n = chunkStart; n < chunkEndMax; n++) {
                boolean isBoundary = true;

                if (n == chunkStart) {
                    n = chunkStart + horizon;
                }

                if (n - chunkStart == this.maxChunkSize) {
                    break;
                }

                long end = Math.min(n + horizon, chunkEndMax);
                for (long i = n - horizon; i < end; i++) {
                    if (i != n &&
                            hashValues[(int) n].intValue() <= hashValues[(int) i].intValue()) {
                        isBoundary = false;
                        break;
                    }
                }

                if (!isBoundary) {
                    continue;
                }

                if (n + horizon > inputLength) {
                    n = chunkEndMax;
                    continue;
                }

                if ((n - (n % horizon) + (2 * horizon)) > inputLength) {
                    continue;
                }

                if (inputLength % horizon == 0 &&
                        ((int) chunkStart - ((int) chunkStart % horizon) + (2 * horizon)) ==
                                inputLength) {
                    continue;
                }

                chunkEnd = n;
                break;
            }

            list.add(this.getChunk(chunkStart, chunkEnd));
            chunkStart = chunkEnd;
        }

        return list;
    }
This method is used to chunk the file data.

@return A list of LeafNodeObjectData.
tika-parsers/tika-parsers-standard/tika-parsers-standard-modules/tika-parser-microsoft-module/src/main/java/org/apache/tika/parser/microsoft/onenote/fsshttpb/streamobj/chunking/RDCAnalysisChunking.java