public static String readFileFromClassPath ( String _fileName ) { StringBuilder sb = new StringBuilder ( ) ; for ( String string : readFileFromClassPathAsList ( _fileName ) ) { sb . append ( string ) . append ( "\n" ) ; } return sb . length ( ) == 0 ? null : sb . toString ( ) ; }
Reads a file from classpath to String .