jvmMain.it.unibo.tuprolog.solve.channel.WriterChannel.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of solve-jvm Show documentation
Show all versions of solve-jvm Show documentation
Resolution-agnostic API for logic solvers
package it.unibo.tuprolog.solve.channel
import it.unibo.tuprolog.solve.channel.impl.AbstractOutputChannel
import java.io.OutputStream
import java.io.OutputStreamWriter
import java.io.Writer
class WriterChannel(private val writer: Writer) : AbstractOutputChannel() {
constructor(outputStream: OutputStream) : this(OutputStreamWriter(outputStream))
override fun writeActually(value: String) = writer.write(value)
override fun flushActually() = writer.flush()
}