Class SourceHandler
- java.lang.Object
-
- org.teichert.databaseexplorer.utils.SourceHandler
-
public class SourceHandler extends Object
Helper-class which provides import methods for handling internal resources like fonts, images, icons and more and caches them too.
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static Object
deserialize(byte[] data, Class<?> type)
static javafx.scene.text.Font
getCachedFont(String name, int size)
static javafx.scene.image.Image
getCachedIcon(Class<?> clazz, String icon)
static javafx.scene.image.Image
getCachedIcon(Class<?> clazz, String icon, double width, double height)
static javafx.scene.image.Image
getCachedIcon(String icon)
static javafx.scene.image.Image
getCachedIcon(String icon, double width, double height)
static Map<String,String>
getFileContent(String object)
static Map<String,InputStream>
getFileInputStream(String object)
static Map<String,URI>
getFileURI(String object)
static String
getIcon(Class<?> clazz, String icon)
static InputStream
getStream(Class<?> clazz, String object)
static InputStream
getStream(String object)
static URL
getURL(Class<?> clazz, String object)
static URL
getURL(String object)
static void
serialize(File outputfile, Object obj)
-
-
-
Method Detail
-
getCachedIcon
public static javafx.scene.image.Image getCachedIcon(String icon)
-
getCachedIcon
public static javafx.scene.image.Image getCachedIcon(String icon, double width, double height)
-
getCachedIcon
public static javafx.scene.image.Image getCachedIcon(Class<?> clazz, String icon, double width, double height)
-
getStream
public static InputStream getStream(String object)
-
getStream
public static InputStream getStream(Class<?> clazz, String object)
-
getCachedFont
public static javafx.scene.text.Font getCachedFont(String name, int size)
-
getFileContent
public static Map<String,String> getFileContent(String object) throws Exception
- Throws:
Exception
-
getFileURI
public static Map<String,URI> getFileURI(String object) throws Exception
- Throws:
Exception
-
getFileInputStream
public static Map<String,InputStream> getFileInputStream(String object)
-
serialize
public static void serialize(File outputfile, Object obj) throws IOException
- Throws:
IOException
-
deserialize
public static Object deserialize(byte[] data, Class<?> type) throws IOException, ClassNotFoundException
- Throws:
IOException
ClassNotFoundException
-
-