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

com.github.houbb.logstash4j.plugins.input.StdIn Maven / Gradle / Ivy

package com.github.houbb.logstash4j.plugins.input;

import com.github.houbb.logstash4j.plugins.api.input.AbstractLogstashInput;

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

/**
 * 标准的输入流
 *
 *
 * @since 0.1.0
 */
public class StdIn extends AbstractLogstashInput {

    @Override
    public void emit() {
        try {
            BufferedReader br = new BufferedReader(new InputStreamReader(System.in));

            String input;

            while ((input = br.readLine()) != null) {
                this.process(input);
            }

        } catch (IOException io) {

        }
    }

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy