public static AbstractChunking createChunkingInstance(byte[] fileContent,
                                                          ChunkingMethod chunkingMethod) {
        AbstractChunking chunking;
        switch (chunkingMethod) {
            case RDCAnalysis:
                chunking = new RDCAnalysisChunking(fileContent);
                break;
            case SimpleAlgorithm:
                chunking = new SimpleChunking(fileContent);
                break;
            case ZipAlgorithm:
                chunking = new ZipFilesChunking(fileContent);
                break;

            default:
                throw new InvalidOperationException(
                        "Cannot support the chunking type" + chunkingMethod);
        }

        return chunking;
    }
This method is used to create the instance of AbstractChunking.

@param fileContent    The content of the file.
@param chunkingMethod The type of chunking methods.
@return The instance of AbstractChunking.
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/ChunkingFactory.java