uk.co.mruoc.file.InputStreamConverter Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of file-loader Show documentation
Show all versions of file-loader Show documentation
Code library to easily load files and file from the classpath or file system file
The newest version!
package uk.co.mruoc.file;
import java.io.IOException;
import java.io.InputStream;
import java.nio.charset.Charset;
import java.util.Properties;
import org.apache.commons.io.IOUtils;
public class InputStreamConverter {
public Properties toProperties(InputStream stream) throws IOException {
Properties properties = new Properties();
properties.load(stream);
return properties;
}
public String toString(InputStream stream) throws IOException {
return IOUtils.toString(stream, Charset.defaultCharset());
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy