common/src/main/java/org/jboss/pnc/common/util/IoUtils.java
public static String readStreamAsString(InputStream stream) throws IOException {
        try (Scanner sc = new Scanner(stream, Charset.defaultCharset().name())) {
            sc.useDelimiter("\\A");
            return sc.next();
        }
    }
public static String readStreamAsString(InputStream stream) throws IOException {
        try (Scanner sc = new Scanner(stream, Charset.defaultCharset().name())) {
            sc.useDelimiter("\\A");
            return sc.next();
        }
    }
Reads whole content of input stream to String

@param stream Opened stream
@return Stream content
@throws IOException Thrown if data couldn't be loaded