Package me.neznamy.tab.api.config
Class YamlConfigurationFile
java.lang.Object
me.neznamy.tab.api.config.ConfigurationFile
me.neznamy.tab.api.config.YamlConfigurationFile
YAML implementation of ConfigurationFile
-
Field Summary
Fields inherited from class me.neznamy.tab.api.config.ConfigurationFile
file, header, values -
Constructor Summary
ConstructorsConstructorDescriptionYamlConfigurationFile(InputStream source, File destination) Constructs new instance and attempts to load specified configuration file. -
Method Summary
Methods inherited from class me.neznamy.tab.api.config.ConfigurationFile
fixHeader, getBoolean, getConfigurationSection, getDouble, getFile, getInt, getInt, getName, getObject, getObject, getObject, getString, getString, getStringList, getStringList, getValues, hasConfigOption, set, setValues
-
Constructor Details
-
YamlConfigurationFile
public YamlConfigurationFile(InputStream source, File destination) throws org.yaml.snakeyaml.error.YAMLException, IOException Constructs new instance and attempts to load specified configuration file. If file does not exist, default file is copied fromsource.- Parameters:
source- Source to copy file from if it does not existdestination- File destination to use- Throws:
IllegalArgumentException- ifdestinationis nullIllegalStateException- if file does not exist and source is nullorg.yaml.snakeyaml.error.YAMLException- if file has invalid YAML syntaxIOException- if I/O operation with the file unexpectedly fails
-
-
Method Details
-
save
public void save()Description copied from class:ConfigurationFileSaves values from map to the file- Specified by:
savein classConfigurationFile
-