Package io.ultreia.java4all.config
Class ConfigResource
- java.lang.Object
-
- io.ultreia.java4all.config.ConfigResource
-
public class ConfigResource extends Object
Created on 07/12/2021.- Since:
- 1.0.18
- Author:
- Tony Chemit - dev@tchemit.fr
-
-
Constructor Summary
Constructors Constructor Description ConfigResource(String location)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidcopyResource(File file)booleancopyResource(Path sharedFile, File file)booleanexists(File directory)FilegetFile(File directory)URLgetResource(String location)URLgetUrl()Propertiesload()static Propertiesload(File file)static Propertiesload(URL url)static voidloadFile(URL url, Path target, Supplier<ApplicationConfig> configSupplier)static InputStreamopenInternalStream(URL resource)List<String>readLines()
-
-
-
Constructor Detail
-
ConfigResource
public ConfigResource(String location)
-
-
Method Detail
-
openInternalStream
public static InputStream openInternalStream(URL resource)
-
loadFile
public static void loadFile(URL url, Path target, Supplier<ApplicationConfig> configSupplier)
-
load
public static Properties load(File file) throws IOException
- Throws:
IOException
-
load
public static Properties load(URL url) throws IOException
- Throws:
IOException
-
load
public Properties load() throws IOException
- Throws:
IOException
-
copyResource
public void copyResource(File file)
-
getUrl
public URL getUrl()
-
exists
public boolean exists(File directory)
-
-