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

com.danielflower.apprunner.io.WriterToOutputBridge Maven / Gradle / Ivy

Go to download

A self-hosted platform-as-a-service that hosts web apps written in Java, Clojure, NodeJS, Python, golang and Scala.

There is a newer version: 2.4.6
Show newest version
package com.danielflower.apprunner.io;

import java.io.IOException;
import java.io.Writer;

public class WriterToOutputBridge extends Writer {
    private final LineConsumer consoleLogHandler;

    public WriterToOutputBridge(LineConsumer consoleLogHandler) {
        this.consoleLogHandler = consoleLogHandler;
    }

    public void write(char[] cbuf, int off, int len) throws IOException {
        String s = new String(cbuf, off, len);
        consoleLogHandler.consumeLine(s);
    }

    public void flush() throws IOException {
    }

    public void close() throws IOException {
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy