Class ConfigWriter
java.lang.Object
com.djrapitops.plan.settings.config.ConfigWriter
Writer for parsing
Config
into file-lines.
ConfigReader can write a single file at a time, so it is NOT thread safe.
-
Constructor Summary
ConstructorDescriptionCreate a new ConfigWriter that doesn't write anywhere.ConfigWriter
(Path outputPath) Create a new ConfigWriter that writes to a Path. -
Method Summary
Modifier and TypeMethodDescriptioncreateLines
(ConfigNode writing) Parse the lines of aConfigNode
.void
write
(ConfigNode writing) Write aConfigNode
into the given resource.
-
Constructor Details
-
ConfigWriter
public ConfigWriter()Create a new ConfigWriter that doesn't write anywhere. -
ConfigWriter
Create a new ConfigWriter that writes to a Path.- Parameters:
outputPath
- Path to write to.
-
-
Method Details
-
write
Write aConfigNode
into the given resource.- Parameters:
writing
- ConfigNode to write.- Throws:
IOException
- If the Path given to constructor can not be written to.IllegalStateException
- If the Path is null
-
createLines
Parse the lines of aConfigNode
."Write" the lines into a List.
- Parameters:
writing
- ConfigNode to "write"- Returns:
- List of lines that would be written.
-