类com.fasterxml.jackson.databind.SequenceWriter源码实例Demo

下面列出了怎么用com.fasterxml.jackson.databind.SequenceWriter的API类实例代码及写法,或者点击链接到github查看源代码。

源代码1 项目: syncope   文件: CSVStreamConnector.java
public SequenceWriter writer() throws IOException {
    synchronized (this) {
        if (writer == null) {
            writer = new CsvMapper().writerFor(Map.class).with(schemaBuilder.build()).writeValues(out);
        }
    }
    return writer;
}
 
源代码2 项目: pegasus   文件: Braindump.java
/**
 * Writes out the braindump.txt file for a workflow in the submit directory. The braindump.txt
 * file is used for passing to the tailstatd daemon that monitors the state of execution of the
 * workflow.
 *
 * @param entries the Map containing the entries going into the braindump file.
 * @return the absolute path to the braindump file.txt written in the directory.
 * @throws IOException in case of error while writing out file.
 */
protected File writeOutBraindumpFile(Map<String, String> entries) throws IOException {
    File f = new File(mSubmitFileDir, BRAINDUMP_FILE);
    YAMLMapper mapper = new YAMLMapper();
    mapper.configure(Feature.WRITE_DOC_START_MARKER, false);
    // SPLIT_LINES feature needs to be disabled until Perl code is deprecated.
    mapper.configure(Feature.SPLIT_LINES, false);
    SequenceWriter writer = mapper.writerWithDefaultPrettyPrinter().writeValues(f);
    writer.write(entries);

    return f;
}
 
 同包方法