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

water.network.util.StreamGobbler Maven / Gradle / Ivy

The newest version!
package water.network.util;

import java.io.BufferedReader;
import java.io.InputStream;
import java.io.InputStreamReader;

class StreamGobbler implements Runnable {

    private final InputStream _is;

    StreamGobbler(InputStream is) {
        _is = is;
    }

    @Override
    public void run() {
        new BufferedReader(new InputStreamReader(_is)).lines()
                .forEach(System.out::println);
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy