本文整理汇总了Java中org.netbeans.api.extexecution.base.input.LineProcessor类的典型用法代码示例。如果您正苦于以下问题:Java LineProcessor类的具体用法?Java LineProcessor怎么用?Java LineProcessor使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
LineProcessor类属于org.netbeans.api.extexecution.base.input包,在下文中一共展示了LineProcessor类的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: runCommand
import org.netbeans.api.extexecution.base.input.LineProcessor; //导入依赖的package包/类
private Future<Integer> runCommand(List<String> params, String title, LineProcessor lineProcessor) {
ExecutionDescriptor descriptor = new ExecutionDescriptor().inputOutput(InputOutput.NULL)
.charset(StandardCharsets.UTF_8)
.outProcessorFactory(getOutputProcessorFactory(lineProcessor));
return run(descriptor, params, title);
}
示例2: getOutputProcessorFactory
import org.netbeans.api.extexecution.base.input.LineProcessor; //导入依赖的package包/类
private ExecutionDescriptor.InputProcessorFactory2 getOutputProcessorFactory(final LineProcessor lineProcessor) {
return inputProcessor -> {
return InputProcessors.ansiStripping(InputProcessors.bridge(lineProcessor));
};
}
示例3: printing
import org.netbeans.api.extexecution.base.input.LineProcessor; //导入依赖的package包/类
/**
* Returns the processor printing all lines passed for processing to
* the given output writer.
* <p>
* Reset action on the returned processor resets the writer if it is enabled
* by passing <code>true</code> as <code>resetEnabled</code>. Processor
* closes the output writer on {@link InputProcessor#close()}.
* <p>
* Returned processor is <i> not thread safe</i>.
*
* @param out where to print received lines
* @param resetEnabled determines whether the reset operation will work
* (will reset the writer if so)
* @return the processor printing all lines passed for processing to
* the given output writer
*/
@NonNull
public static LineProcessor printing(@NonNull OutputWriter out, boolean resetEnabled) {
return printing(out, null, resetEnabled);
}