转换InputStream到String, 比如//引入apache的io包 import org.apache.commons.io.IOUtils; ... ...String str = IOUtils.toString(is, "UTF-8");