public class ResourceUtil extends Object
| Constructor and Description |
|---|
ResourceUtil() |
| Modifier and Type | Method and Description |
|---|---|
static boolean |
jsonEquals(com.google.gson.JsonObject first,
com.google.gson.JsonObject second) |
static <T> T |
load(File file,
Class<T> clazz) |
static <T> T |
load(File file,
Class<T> clazz,
ResourceFileType resourceFileType) |
static <T> T |
load(InputStream in,
Class<T> clazz,
ResourceFileType resourceFileType) |
static File |
save(File file,
Object data) |
static File |
save(File file,
Object data,
ResourceFileType type) |
static String |
toJson(Object resource) |
static String |
toYaml(Object resource) |
public static boolean jsonEquals(com.google.gson.JsonObject first,
com.google.gson.JsonObject second)
public static <T> T load(File file, Class<T> clazz) throws IOException
IOExceptionpublic static <T> T load(File file, Class<T> clazz, ResourceFileType resourceFileType) throws IOException
IOExceptionpublic static <T> T load(InputStream in, Class<T> clazz, ResourceFileType resourceFileType) throws IOException
IOExceptionpublic static File save(File file, Object data) throws IOException
IOExceptionpublic static File save(File file, Object data, ResourceFileType type) throws IOException
IOExceptionpublic static String toYaml(Object resource) throws com.fasterxml.jackson.core.JsonProcessingException
com.fasterxml.jackson.core.JsonProcessingExceptionCopyright © 2019. All rights reserved.