Example usage for com.fasterxml.jackson.databind SequenceWriter close

List of usage examples for com.fasterxml.jackson.databind SequenceWriter close

Introduction

In this page you can find the example usage for com.fasterxml.jackson.databind SequenceWriter close.

Prototype

@Override
    public void close() throws IOException 

Source Link

Usage

From source file:org.apache.hyracks.maven.license.GenerateFileMojo.java

private void persistLicenseMap() throws IOException {
    if (licenseMapOutputFile != null) {
        licenseMapOutputFile.getParentFile().mkdirs();
        SequenceWriter sw = new ObjectMapper().writerWithDefaultPrettyPrinter()
                .writeValues(licenseMapOutputFile).init(true);
        for (LicensedProjects entry : licenseMap.values()) {
            sw.write(entry);/*www . jav  a  2 s  . c  o  m*/
        }
        sw.close();
    }
}