Created
October 15, 2017 20:04
-
-
Save grkvlt/c3df558276d1d005695cb93d25cb306e to your computer and use it in GitHub Desktop.
Exploring Iterated Function Systems
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public static void save(IFS ifs, File file) { | |
try (FileWriter writer = new FileWriter(file)) { | |
JAXBContext context = JAXBContext.newInstance(IFS.class); | |
Marshaller marshaller = context.createMarshaller(); | |
marshaller.setProperty(Marshaller.JAXB_FORMATTED_OUTPUT, Boolean.TRUE); | |
marshaller.marshal(ifs, writer); | |
} catch (Exception e) { | |
throw new RuntimeException(e); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment