private ByteArrayMultipartFile readMultiPart(MultipartStream multipartStream) throws IOException {
    val multiPartHeaders =
        splitIntoKeyValuePairs(
            multipartStream.readHeaders(), NEWLINES_PATTERN, COLON_PATTERN, false);

    val contentDisposition =
        splitIntoKeyValuePairs(
            multiPartHeaders.get(CONTENT_DISPOSITION),
            SEMICOLON_PATTERN,
            EQUALITY_SIGN_PATTERN,
            true);

    if (!contentDisposition.containsKey("form-data")) {
      throw new HttpMessageConversionException("Content-Disposition is not of type form-data.");
    }

    val bodyStream = new ByteArrayOutputStream();
    multipartStream.readBodyData(bodyStream);
    return new ByteArrayMultipartFile(
        contentDisposition.get("name"),
        contentDisposition.get("filename"),
        multiPartHeaders.get(CONTENT_TYPE),
        bodyStream.toByteArray());
  }
Construct an {@code AbstractHttpMessageConverter} that can read mulitpart/form-data.

@param bufSize The size of the buffer (in bytes) to read the HTTP multipart body.
form-spring/src/main/java/feign/form/spring/converter/SpringManyMultipartFilesReader.java