@Service public class DefaultYamlService extends Object implements YamlService
| Constructor and Description |
|---|
DefaultYamlService() |
| Modifier and Type | Method and Description |
|---|---|
<T> T |
readValue(File src,
Class<T> valueType)
Deserializes a YAML value to a Java one from a given file.
|
void |
writeValueToFile(File resultFile,
Object object)
Serializes any Java value as YAML in the given file.
|
public void writeValueToFile(File resultFile, Object object) throws IOException
writeValueToFile in interface YamlServiceresultFile - output file.object - object value.IOException - If serialization operation fails.public <T> T readValue(File src, Class<T> valueType) throws IOException
readValue in interface YamlServicesrc - the source file.valueType - the class of the output value type.IOException - if a low-level I/O problem occurs while deserializing the YAML value.Copyright © 2021 MuleSoft, Inc.. All rights reserved.