// Path: src/main/java/org/echocat/gradle/plugins/golang/utils/StdStreams.java
// public static class Impl implements StdStreams {
// 
//     @Nonnull
//     public static StdStreams stdStreams(@Nonnull OutputStream out, @Nonnull OutputStream err) {
//         return new Impl(out, err);
//     }
// 
//     @Nonnull
//     public static StdStreams stdStreams(@Nonnull OutputStream out) {
//         return stdStreams(out, out);
//     }
// 
//     @Nonnull
//     private final OutputStream _out;
//     @Nonnull
//     private final OutputStream _err;
// 
//     public Impl(@Nonnull OutputStream out, @Nonnull OutputStream err) {
//         _out = out;
//         _err = err;
//     }
// 
//     @Override
//     @Nonnull
//     public OutputStream out() {
//         return _out;
//     }
// 
//     @Override
//     @Nonnull
//     public OutputStream err() {
//         return _err;
//     }
// 
//     @Override
//     public void close() throws IOException {
//         closeQuietly(_out);
//         closeQuietly(_err);
//     }
// 
// }


import org.apache.commons.io.output.TeeOutputStream;
import org.echocat.gradle.plugins.golang.utils.StdStreams.Impl;
import javax.annotation.Nonnull;
import javax.annotation.Nullable;
import java.io.OutputStream;
package org.echocat.gradle.plugins.golang.utils;



public final class IOUtils {

    @Nonnull
    public static StdStreams tee(@Nonnull StdStreams a, @Nonnull StdStreams b) {
        final OutputStream out = new TeeOutputStream(a.out(), b.out());
        final OutputStream err = new TeeOutputStream(a.err(), b.err());
// Path: src/main/java/org/echocat/gradle/plugins/golang/utils/StdStreams.java
// public static class Impl implements StdStreams {
// 
//     @Nonnull
//     public static StdStreams stdStreams(@Nonnull OutputStream out, @Nonnull OutputStream err) {
//         return new Impl(out, err);
//     }
// 
//     @Nonnull
//     public static StdStreams stdStreams(@Nonnull OutputStream out) {
//         return stdStreams(out, out);
//     }
// 
//     @Nonnull
//     private final OutputStream _out;
//     @Nonnull
//     private final OutputStream _err;
// 
//     public Impl(@Nonnull OutputStream out, @Nonnull OutputStream err) {
//         _out = out;
//         _err = err;
//     }
// 
//     @Override
//     @Nonnull
//     public OutputStream out() {
//         return _out;
//     }
// 
//     @Override
//     @Nonnull
//     public OutputStream err() {
//         return _err;
//     }
// 
//     @Override
//     public void close() throws IOException {
//         closeQuietly(_out);
//         closeQuietly(_err);
//     }
// 
// }


// Path: src/main/java/org/echocat/gradle/plugins/golang/utils/IOUtils.java
import org.apache.commons.io.output.TeeOutputStream;
import org.echocat.gradle.plugins.golang.utils.StdStreams.Impl;
import javax.annotation.Nonnull;
import javax.annotation.Nullable;
import java.io.OutputStream;

package org.echocat.gradle.plugins.golang.utils;



public final class IOUtils {

    @Nonnull
    public static StdStreams tee(@Nonnull StdStreams a, @Nonnull StdStreams b) {
        final OutputStream out = new TeeOutputStream(a.out(), b.out());
        final OutputStream err = new TeeOutputStream(a.err(), b.err());
        return new Impl(out, err);