我有休息 CXF 客户端,必须下载带有文件的多部分正文。我有这样的代码:
WebClient client = WebClient.create(adress);
client.path(path);
Response response = client.get();
InputStream recivedfile = (InputStream) response.getEntity();
实体类其实就是:sun.net.www.protocol.http.HttpURLConnection$HttpInputStream。当我阅读输入团队的表格时,我得到:
--uuid:e7c56944-f1c2-4cae-8460-4161b5100f60
Content-Type: application/xml
Content-Transfer-Encoding: binary
Content-ID: <root.message@cxf.apache.org>
Content-Disposition: attachment; filename="file.xsl"
<my file>
--uuid:e7c56944-f1c2-4cae-8460-4161b5100f60--
我不需要整个“内容”属性和 UUID 编号。阅读与跳过这些内容的联系的最佳方式是什么?