字节到流
程序员文章站
2022-07-05 08:39:18
...
得到了 byte[],转成流:
此时strInStream就可以使用了
- byte[] responseBody = getMethod.getResponseBody();
- SAXReader saxReader = new SAXReader();
- InputStream in = new ByteArrayInputStream(responseBody);
- InputStreamReader strInStream = new InputStreamReader(in, "GBK");
byte[] responseBody = getMethod.getResponseBody(); SAXReader saxReader = new SAXReader(); InputStream in = new ByteArrayInputStream(responseBody); InputStreamReader strInStream = new InputStreamReader(in, "GBK");
此时strInStream就可以使用了
上一篇: javascrip 冒泡,冒泡阻止
下一篇: 删除Openoffice.org