java.lang.Object
net.foxgenesis.util.ResourceUtils
-
Nested Class Summary
Nested Classes -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic PropertiesgetProperties(URL path) static PropertiesgetProperties(Path path, ResourceUtils.ModuleResource defaults) linesFromResource(URL path) Read all lines from a resourcestatic org.apache.commons.configuration2.PropertiesConfigurationloadConfig(ResourceUtils.ModuleResource defaults, Path dir, String output) static String[]toSplitString(InputStream input) static StringtoString(InputStream input)
-
Constructor Details
-
ResourceUtils
public ResourceUtils()
-
-
Method Details
-
linesFromResource
Read all lines from a resource- Parameters:
path- -URLpath to the resource- Returns:
- Returns all lines as a
List<String> - Throws:
IOException- Thrown if an error occurs while reading theInputStreamof the resource
-
getProperties
- Throws:
IOException
-
getProperties
public static Properties getProperties(Path path, ResourceUtils.ModuleResource defaults) throws IOException - Throws:
IOException
-
loadConfig
public static org.apache.commons.configuration2.PropertiesConfiguration loadConfig(ResourceUtils.ModuleResource defaults, Path dir, String output) throws IOException, org.apache.commons.configuration2.ex.ConfigurationException - Throws:
IOExceptionorg.apache.commons.configuration2.ex.ConfigurationException
-
toString
- Throws:
IOException
-
toSplitString
- Throws:
IOException
-