Package xyz.cp74.utils
Class YamlUtils
- java.lang.Object
-
- xyz.cp74.utils.YamlUtils
-
public class YamlUtils extends Object
YamlUtils Read and Write YAML files.- Author:
- Christian Paul
-
-
Constructor Summary
Constructors Constructor Description YamlUtils()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static Objectread(String filename, Class<?> clazz)Read YAML file with @param filename and create object of @param clazzstatic Map<String,Object>readMap(String filename)Read YAML file with @param filename and @return mapstatic ObjectreadString(String content, Class<?> clazz)Read YAML @param content from string and create object of @param clazzstatic Stringwrite(Object object)Write @param object to YAML file to stringstatic Filewrite(Object object, String filename)Write @param object to YAML file with @param filename
-
-
-
Method Detail
-
readMap
public static Map<String,Object> readMap(String filename)
Read YAML file with @param filename and @return map
-
write
public static File write(Object object, String filename)
Write @param object to YAML file with @param filename- Returns:
- File
-
write
public static String write(Object object)
Write @param object to YAML file to string- Returns:
- String
-
read
public static Object read(String filename, Class<?> clazz)
Read YAML file with @param filename and create object of @param clazz- Returns:
- Object
-
-