FileInputStream中的这个方法可以返回实际的字节数
InputStream is = request.getInputStream();
byte[] buf = new byte[is.available()];
is.read(buf);
System.out.println(new String(buf));
/*InputStream in = request.getInputStream();
byte[] buf = new byte[1000];
int len = 0;
while((len = in.read(buf)) != -1) {
System.out.println(new String(buf,0,len));
}
这里用上面的方法获取客户端数据就不行