Skip to content

Instantly share code, notes, and snippets.

@nvanselow
Created September 13, 2017 03:31
Show Gist options
  • Save nvanselow/3bf13f6df03a84b8ace6b3241656565e to your computer and use it in GitHub Desktop.
Save nvanselow/3bf13f6df03a84b8ace6b3241656565e to your computer and use it in GitHub Desktop.
Java convert stream to readable string
StringWriter writer = new StringWriter();
IOUtils.copy(stream, writer, "UTF-8");
String theString = writer.toString();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment