Created
September 13, 2017 03:31
-
-
Save nvanselow/3bf13f6df03a84b8ace6b3241656565e to your computer and use it in GitHub Desktop.
Java convert stream to readable string
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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