public Map<String, PartItem> readParts(InputStream input, String contentType) throws MultiPartException {
        try {
            var multipart = MultiPartFormData.getParts(
                Content.Source.from(input),
                new Attributes.Mapped(),
                contentType,
                new MultiPartConfig.Builder()
                        .maxPartSize(-1)
                        .maxSize(-1)
                        .maxHeadersSize(-1)
                        .maxParts(-1)
                        .maxMemoryPartSize(maxMemoryPartSize)
                        .location(partsTempDir)
                        .complianceMode(MultiPartCompliance.RFC7578)
                        .build());

            Map<String, PartItem> result = new TreeMap<>();
            for (var part : multipart) {
                var item = new PartItem(
                    part.getName(),
                    Content.Source.asInputStream(part.getContentSource()),
                    part.getHeaders().get(HttpHeader.CONTENT_TYPE));
                result.put(part.getName(), item);
            }
            return result;
        } catch (Exception e) {
            throw new MultiPartException(e);
        }
    }
Wrapper around Jetty's {@link MultiPart}.

@author bjorncs
container-core/src/main/java/com/yahoo/container/jdisc/utils/MultiPartFormParser.java