java.lang.Object
org.miaixz.bus.setting.metric.toml.Toml
A utility class providing static methods for reading and writing TOML data.
- Since:
- Java 17+
- Author:
- Kimi Liu
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final DateTimeFormatterADateTimeFormatterthat parses and formats dates and times according to the TOML specification. -
Constructor Summary
Constructors -
Method Summary
-
Field Details
-
DATE_FORMATTER
ADateTimeFormatterthat parses and formats dates and times according to the TOML specification.
-
-
Constructor Details
-
Toml
public Toml()
-
-
Method Details
-
read
Reads and parses TOML data from a givenResource.- Parameters:
resource- The resource containing the TOML data.- Returns:
- A map representing the parsed TOML data.
-
write
Writes the given data map to aWriterin TOML format.- Parameters:
data- The map of data to be written.writer- The writer to which the TOML data will be written.
-