request.setCharacterEncoding("UTF-8");
in = request.getInputStream();
int len = request.getContentLength();
if (len <= 0) {
return "";
}
byte[] buffer = new byte[len];
in.read(buffer);
s = new String(buffer,"UTF-8");
本文共 264 字,大约阅读时间需要 1 分钟。
request.setCharacterEncoding("UTF-8");
in = request.getInputStream();
int len = request.getContentLength();
if (len <= 0) {
return "";
}
byte[] buffer = new byte[len];
in.read(buffer);
s = new String(buffer,"UTF-8");
转载于:https://my.oschina.net/u/199525/blog/226241