java读取request中的xml

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();

上一篇:myeclipse中tomcat配置虚拟路径,用于存储及上传图片


下一篇:Python-定时爬取指定城市天气(二)-邮件提醒