Package com.codingchili.core.files
Class YamlFileStore
java.lang.Object
com.codingchili.core.files.YamlFileStore
- All Implemented Interfaces:
FileStore
Parses YAML configuration files into JsonObjects.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionio.vertx.core.json.JsonObject
readObject(io.vertx.core.buffer.Buffer buffer)
Reads a T object from a specified application-relative path.void
writeObject(io.vertx.core.json.JsonObject object, Path path)
Writes a json-object to the given path.
-
Constructor Details
-
YamlFileStore
public YamlFileStore()
-
-
Method Details
-
readObject
public io.vertx.core.json.JsonObject readObject(io.vertx.core.buffer.Buffer buffer)Description copied from interface:FileStore
Reads a T object from a specified application-relative path.- Specified by:
readObject
in interfaceFileStore
- Parameters:
buffer
- data of the object to read to json- Returns:
- the loaded json object.
-
writeObject
Description copied from interface:FileStore
Writes a json-object to the given path.- Specified by:
writeObject
in interfaceFileStore
- Parameters:
object
- the object to write.path
- the path to where the object is written to.
-
getExtensions
- Specified by:
getExtensions
in interfaceFileStore
- Returns:
- the extension handled by this file store.
-