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

com.redhat.insights.tls.CertStreamHandler Maven / Gradle / Ivy

There is a newer version: 2.0.4
Show newest version
/* Copyright (C) Red Hat 2023 */
package com.redhat.insights.tls;

import java.io.BufferedReader;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.util.function.Consumer;

public class CertStreamHandler implements Runnable {
  private InputStream inputStream;
  private Consumer consumer;

  public CertStreamHandler(InputStream inputStream, Consumer consumer) {
    this.inputStream = inputStream;
    this.consumer = consumer;
  }

  @Override
  public void run() {
    new BufferedReader(new InputStreamReader(inputStream)).lines().forEach(consumer);
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy