我希望有人可以帮助我。我正在向服务器发送这样的请求:
ClientResponse cr = service.path(url)
.accept(MediaType.MULTIPART_FORM_DATA).get(ClientResponse.class);
作为回应,我收到了一条看起来像这样的多部分消息:
------- =_aaaaaaaaaaA
Content-Type: text/plain; Content-Id: "name"
bkbfdkbfkdbfk3ik3ooijo
------- =_aaaaaaaaaaB
Content-Type: application/octet-stream; Content-Id: "image"
nkniha3q479894ph4934233
我的问题是如何通过 Id 阅读该消息的那些正文部分?我需要将该消息的每个部分存储在不同的位置。