How do I Read / Convert an Input Stream into a String in Java? The Problem You’re writing some code and are faced with converting some unknown length Input Stream containing text to a String object in Java.