List of usage examples for com.fasterxml.jackson.databind SequenceWriter write
public SequenceWriter write(Object value) throws IOException
From source file:org.teavm.libgdx.plugin.AssetsCopier.java
private void writeJsonFS(OutputStream output) throws IOException { SequenceWriter seqWriter = writer.writeValues(output); boolean first = true; output.write((byte) '['); for (FileDescriptor desc : rootFileDescriptor.getChildFiles()) { if (!first) { output.write((byte) ','); }/*from ww w . ja v a 2s . c o m*/ first = false; seqWriter.write(desc); } output.write((byte) ']'); seqWriter.flush(); }
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); }/*from w w w. ja v a2 s. c o m*/ sw.close(); } }