上传图片的时候报编码错误 java.nio.charset.MalformedInputException: Input length = 1 ?

一开始是没问题的,之后重装了系统换了个idea就报错了,bufferedReader.readLine()这行报了编码错误,普通的post请求带中文都没问题,只有上传图片的时候会报错

public XssHttpServletRequestWrapper(HttpServletRequest request) throws IOException {

super(request);

StringBuilder sBuffer = new StringBuilder();

BufferedReader bufferedReader = request.getReader();

String line;

while ((line = bufferedReader.readLine()) != null) {

sBuffer.append(line);

}

_body = sBuffer.toString();

}

以上是 上传图片的时候报编码错误 java.nio.charset.MalformedInputException: Input length = 1 ? 的全部内容, 来源链接: utcz.com/p/944999.html

回到顶部