本文整理了Java中org.asciidoctor.Options.setToFile()
方法的一些代码示例,展示了Options.setToFile()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Options.setToFile()
方法的具体详情如下:
包路径:org.asciidoctor.Options
类名称:Options
方法名:setToFile
[英]Enable writing output to a file. The file includes header and footer by default.
[中]允许将输出写入文件。默认情况下,该文件包括页眉和页脚。
代码示例来源:origin: spring-projects/spring-restdocs
private File configurePdfOutput() {
this.options.setBackend("pdf");
File output = new File("build/output.pdf");
this.options.setToFile(output.getAbsolutePath());
return output;
}
代码示例来源:origin: asciidoctor/asciidoctorj
/**
* Sets to file value. This toggles writing output to a file or returning output
* as a string. If writing to a string, the header and footer are omitted from the
* output by default.
*
* @param toFile
* <code>true</code> to write output to a file, <code>false</code>
* to write output to a string.
* @return this instance.
*/
public OptionsBuilder toFile(boolean toFile) {
this.options.setToFile(toFile);
return this;
}
代码示例来源:origin: org.asciidoctor/asciidoctorj-api
/**
* Sets to file value. This toggles writing output to a file or returning output
* as a string. If writing to a string, the header and footer are omitted from the
* output by default.
*
* @param toFile
* <code>true</code> to write output to a file, <code>false</code>
* to write output to a string.
* @return this instance.
*/
public OptionsBuilder toFile(boolean toFile) {
this.options.setToFile(toFile);
return this;
}
代码示例来源:origin: asciidoctor/asciidoctorj
/**
* Sets to file value. This is the destination file name.
*
* @param toFile
* name of output file.
* @return this instance.
*/
public OptionsBuilder toFile(File toFile) {
this.options.setToFile(toFile.getPath());
return this;
}
代码示例来源:origin: org.asciidoctor/asciidoctor-java-integration
/**
* Sets to file value. This is the destination file name.
* @param toFile name of output file.
* @return this instance.
*/
public OptionsBuilder toFile(File toFile) {
this.options.setToFile(toFile.getPath());
return this;
}
代码示例来源:origin: org.asciidoctor/asciidoctorj-api
/**
* Sets to file value. This is the destination file name.
*
* @param toFile
* name of output file.
* @return this instance.
*/
public OptionsBuilder toFile(File toFile) {
this.options.setToFile(toFile.getPath());
return this;
}
代码示例来源:origin: de.elnarion.util/docconverter-adoc2adoc
private List<InputStream> convertToInputStreams(List<File> source)
throws IOException {
List<InputStream> inputStreams = new ArrayList<>();
Asciidoctor asciidoctor = Factory.create();
ExtensionGroup group = asciidoctor.createGroup();
Preprocessor preprocessor = new Preprocessor();
group.preprocessor(preprocessor);
Options options = new Options();
options.setToFile(false);
options.setSafe(SafeMode.UNSAFE);
group.register();
for (File file : source) {
inputStreams.add(processSingleFile(file, asciidoctor, group, preprocessor, options));
}
return inputStreams;
}
代码示例来源:origin: com.qwazr/qwazr-library-asciidoctor
options.setToFile(to_file);
if (in_place != null)
options.setInPlace(in_place);
内容来源于网络,如有侵权,请联系作者删除!