V2EX = way to explore
V2EX 是一个关于分享和探索的地方
Sign Up Now
For Existing Member  Sign In
359889741
V2EX  ›  Java

IOUtils.toString 返回乱码

  •  
  •   359889741 · Sep 18, 2018 · 3546 views
    This topic created in 2778 days ago, the information mentioned may be changed or developed.
    359889741
        1
    359889741  
    OP
       Sep 18, 2018
    RequestContext ctx = RequestContext.getCurrentContext();
    InputStream stream = ctx.getResponseDataStream();
    resBody = IOUtils.toString(stream);

    HttpServletResponse 获取返回结果 resBody 乱码
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   5875 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 35ms · UTC 01:53 · PVG 09:53 · LAX 18:53 · JFK 21:53
    ♥ Do have faith in what you're doing.