本文整理匯總了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);
}