后台接收方式:

 

InputStream inputStream = request.getInputStream();

byte[] buff = new byte[1024];
int len = -1;
while (-1 != (len = inputStream.read(buff))) {
// 将字节数组转换为字符串,并且设置为“UTF-8”格式编码(不然会出现乱码)
String res = new String(buff, 0, len,"UTF-8");
jsonObject = new org.json.JSONObject(res);

int offset = jsonObject.getInt("offset");
int limit = jsonObject.getInt("limit");
}

相关文章:

  • 2021-08-23
  • 2021-07-11
  • 2021-07-06
猜你喜欢
  • 2021-07-07
  • 2021-07-11
  • 2022-12-23
  • 2021-04-07
  • 2021-12-19
  • 2022-12-23
相关资源
相似解决方案