public FeedOperation getNextOperation(InputStream requestInputStream, FeederSettings settings) throws Exception {
        int length = readByteLength(requestInputStream);
        try (InputStream limitedInputStream = new ByteLimitedInputStream(requestInputStream, length)){
            FeedReader reader = feedReaderFactory.createReader(limitedInputStream, docTypeManager, settings.dataFormat);
            return reader.read();
        }
    }
This code is based on v2 code, but restructured so stream reading code is in one dedicated class.

@author Haakon Dybdahl
vespaclient-container-plugin/src/main/java/com/yahoo/vespa/http/server/StreamReaderV3.java