V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
359889741
V2EX  ›  Java

IOUtils.toString 返回乱码

  •  
  •   359889741 · 2018-09-18 14:52:16 +08:00 · 2627 次点击
    这是一个创建于 2019 天前的主题,其中的信息可能已经有所发展或是发生改变。
    359889741
        1
    359889741  
    OP
       2018-09-18 14:54:52 +08:00
    RequestContext ctx = RequestContext.getCurrentContext();
    InputStream stream = ctx.getResponseDataStream();
    resBody = IOUtils.toString(stream);

    HttpServletResponse 获取返回结果 resBody 乱码
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   3587 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 23ms · UTC 10:30 · PVG 18:30 · LAX 03:30 · JFK 06:30
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.