All Downloads are FREE. Search and download functionalities are using the official Maven repository.

dev.gradleplugins.runnerkit.providers.StandardStreamProvider Maven / Gradle / Ivy

There is a newer version: 0.0.148
Show newest version
package dev.gradleplugins.runnerkit.providers;

import org.apache.commons.io.output.WriterOutputStream;

import java.io.OutputStream;
import java.io.Writer;
import java.nio.charset.Charset;

public final class StandardStreamProvider extends AbstractGradleExecutionProvider {
    public static StandardStreamProvider forwardToStandardOutput() {
        return fixed(StandardStreamProvider.class, System.out);
    }

    public static StandardStreamProvider forwardToStandardError() {
        return fixed(StandardStreamProvider.class, System.err);
    }

    public static StandardStreamProvider of(Writer writer) {
        return fixed(StandardStreamProvider.class, new WriterOutputStream(writer, Charset.defaultCharset()));
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy