java读取request中的xml
答:
// 读取xml
InputStream inputStream;
StringBuffer sb = new StringBuffer();
inputStream = request.getInputStream();
String s;
BufferedReader in = new BufferedReader(new InputStreamReader(inputStream, "UTF-8"));
while ((s = in.readLine()) != null) {
sb.append(s);
}
in.close();
inputStream.close();
原文地址:https://www.cnblogs.com/chinaifae/p/10188809.html
时间: 2024-10-12 12:46:07