private static Reader loadInputStream(InputStream propertiesStream) throws IOException {
        StringBuilder buff = new StringBuilder();

        try (InputStreamReader isr = new InputStreamReader(propertiesStream, Charset.defaultCharset());
                BufferedReader reader = new BufferedReader(isr)) {
            String line;
            while ((line = reader.readLine()) != null) {
                buff.append(line).append("\n");
            }
        }

        return new StringReader(StrSubstitutor.replaceSystemProperties(buff.toString()));
    }
private static Reader loadInputStream ( InputStream propertiesStream ) throws IOException { StringBuilder buff = new StringBuilder ( ) ; try ( InputStreamReader isr = new InputStreamReader ( propertiesStream , Charset . defaultCharset ( ) ) ; BufferedReader reader = new BufferedReader ( isr ) ) { String line ; while ( ( line = reader . readLine ( ) ) != null ) { buff . append ( line ) . append ( "\n" ) ; } } return new StringReader ( StrSubstitutor . replaceSystemProperties ( buff . toString ( ) ) ) ; }
Reads the {@link InputStream} and substitutes system properties.

@return {@link Reader}