Package fr.ird.observe.dto
Class ObserveUtil
- java.lang.Object
-
- fr.ird.observe.dto.ObserveUtil
-
public class ObserveUtil extends Object
Pour mettre du code util commun.Created on 01/09/16.
- Since:
- 5.0
- Author:
- Tony Chemit - dev@tchemit.fr
-
-
Field Summary
Fields Modifier and Type Field Description static StringPNG_EXTENSIONstatic StringPNG_EXTENSION_PATTERNstatic StringPROPERTIES_EXTENSIONstatic StringPROPERTIES_EXTENSION_PATTERNstatic StringSQL_GZ_EXTENSIONstatic StringSQL_GZ_EXTENSION_PATTERN
-
Constructor Summary
Constructors Constructor Description ObserveUtil()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static StringaddSqlGzExtension(String filePath)static voidcleanMemory()static voidcopyResource(URL resource, File file)static voidloadLogConfiguration(URL logInput, Path logFile, Supplier<io.ultreia.java4all.config.ApplicationConfig> configSupplier)static InputStreamopenInternalStream(URL resource)static StringremoveSqlGzExtension(String filePath)static <C extends Class<?>>
List<C>sortTypes(Collection<C> types, Function<Class,String> function, Locale locale)static booleanwithSqlGzExtension(String filePath)
-
-
-
Field Detail
-
SQL_GZ_EXTENSION_PATTERN
public static final String SQL_GZ_EXTENSION_PATTERN
- See Also:
- Constant Field Values
-
SQL_GZ_EXTENSION
public static final String SQL_GZ_EXTENSION
- See Also:
- Constant Field Values
-
PROPERTIES_EXTENSION_PATTERN
public static final String PROPERTIES_EXTENSION_PATTERN
- See Also:
- Constant Field Values
-
PROPERTIES_EXTENSION
public static final String PROPERTIES_EXTENSION
- See Also:
- Constant Field Values
-
PNG_EXTENSION_PATTERN
public static final String PNG_EXTENSION_PATTERN
- See Also:
- Constant Field Values
-
PNG_EXTENSION
public static final String PNG_EXTENSION
- See Also:
- Constant Field Values
-
-
Method Detail
-
sortTypes
public static <C extends Class<?>> List<C> sortTypes(Collection<C> types, Function<Class,String> function, Locale locale)
-
loadLogConfiguration
public static void loadLogConfiguration(URL logInput, Path logFile, Supplier<io.ultreia.java4all.config.ApplicationConfig> configSupplier) throws IOException
- Throws:
IOException
-
cleanMemory
public static void cleanMemory()
-
withSqlGzExtension
public static boolean withSqlGzExtension(String filePath)
-
openInternalStream
public static InputStream openInternalStream(URL resource)
-
copyResource
public static void copyResource(URL resource, File file) throws IOException
- Throws:
IOException
-
-