Class ConfigWriter
- java.lang.Object
-
- com.djrapitops.plan.settings.config.ConfigWriter
-
public class ConfigWriter extends java.lang.Object
Writer for parsingConfig
into file-lines.ConfigReader can write a single file at a time, so it is NOT thread safe.
-
-
Constructor Summary
Constructors Constructor Description ConfigWriter()
Create a new ConfigWriter that doesn't write anywhere.ConfigWriter(java.nio.file.Path outputPath)
Create a new ConfigWriter that writes to a Path.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.List<java.lang.String>
createLines(ConfigNode writing)
Parse the lines of aConfigNode
.void
write(ConfigNode writing)
Write aConfigNode
into the given resource.
-
-
-
Method Detail
-
write
public void write(ConfigNode writing) throws java.io.IOException
Write aConfigNode
into the given resource.- Parameters:
writing
- ConfigNode to write.- Throws:
java.io.IOException
- If the Path given to constructor can not be written to.java.lang.IllegalStateException
- If the Path is null
-
createLines
public java.util.List<java.lang.String> createLines(ConfigNode writing)
Parse the lines of aConfigNode
."Write" the lines into a List.
- Parameters:
writing
- ConfigNode to "write"- Returns:
- List of lines that would be written.
-
-