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

@param fileName Existing file
@return File content
@throws IOException Thrown if data couldn't be loaded
Reads whole content of file to String