我想做的是从List<byte[]>
获得InputStream
。我正在将HTTP请求发送到返回List<byte[]>
的API,我想从内容主体中获取该列表。
HttpPost httpPost = new HttpPost(endPoint);
CloseableHttpClient httpclient = HttpClients.createDefault();
httpPost.setEntity(new ByteArrayEntity(ReqBody));
CloseableHttpResponse response = httpclient.execute(httpPost);
System.out.println(response.getStatusLine());
System.out.println(response.getEntity().getContentType());
return response.getEntity().getContent();