quickstart.src.main.java.org.gradle.sample.Greeter Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of gradle-api Show documentation
Show all versions of gradle-api Show documentation
Gradle 6.9.1 API redistribution.
package org.gradle.sample;
import java.io.InputStream;
import org.apache.log4j.LogManager;
import org.apache.commons.io.IOUtils;
public class Greeter {
public String getGreeting() throws Exception {
LogManager.getRootLogger().info("generating greeting.");
InputStream greetingStr = getClass().getResourceAsStream("/greeting.txt");
try {
return IOUtils.toString(greetingStr).trim();
}
finally {
greetingStr.close();
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy