0
我有其他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。 Whern我讀的形式,我得到的輸入隊伍:
--uuid:e7c56944-f1c2-4cae-8460-4161b5100f60
Content-Type: application/xml
Content-Transfer-Encoding: binary
Content-ID: <[email protected]>
Content-Disposition: attachment; filename="file.xsl"
<my file>
--uuid:e7c56944-f1c2-4cae-8460-4161b5100f60--
我不需要整個'內容'屬性和UUID號碼。通過跳過這些東西來閱讀該連接的最佳方式是什麼?