Clean up terminal configuration
This commit is contained in:
parent
e76aefa3d1
commit
a20849a5b4
|
@ -9,15 +9,11 @@ import java.io.PipedOutputStream
|
||||||
|
|
||||||
class TerminalConfiguration {
|
class TerminalConfiguration {
|
||||||
|
|
||||||
var inputWriter: PipedOutputStream? = null
|
lateinit var inputWriter: PipedOutputStream
|
||||||
private set
|
|
||||||
lateinit var inputReader: PipedInputStream
|
lateinit var inputReader: PipedInputStream
|
||||||
private set
|
lateinit var outputWriter: PipedOutputStream
|
||||||
var outputWriter: PipedOutputStream? = null
|
lateinit var outputReader: PipedInputStream
|
||||||
private set
|
lateinit var terminal: IOSafeTerminal
|
||||||
var outputReader: PipedInputStream? = null
|
|
||||||
private set
|
|
||||||
var terminal: IOSafeTerminal? = null
|
|
||||||
|
|
||||||
fun setInputPair(inputWriter: PipedOutputStream, inputReader: PipedInputStream) {
|
fun setInputPair(inputWriter: PipedOutputStream, inputReader: PipedInputStream) {
|
||||||
this.inputWriter = inputWriter
|
this.inputWriter = inputWriter
|
||||||
|
@ -27,7 +23,7 @@ class TerminalConfiguration {
|
||||||
|
|
||||||
private fun connectInputPair() {
|
private fun connectInputPair() {
|
||||||
try {
|
try {
|
||||||
inputWriter!!.connect(inputReader!!)
|
inputWriter.connect(inputReader)
|
||||||
} catch (e: IOException) {
|
} catch (e: IOException) {
|
||||||
throw LispIOException(e)
|
throw LispIOException(e)
|
||||||
}
|
}
|
||||||
|
@ -41,7 +37,7 @@ class TerminalConfiguration {
|
||||||
|
|
||||||
private fun connectOutputPair() {
|
private fun connectOutputPair() {
|
||||||
try {
|
try {
|
||||||
outputWriter!!.connect(outputReader!!)
|
outputWriter.connect(outputReader)
|
||||||
} catch (e: IOException) {
|
} catch (e: IOException) {
|
||||||
throw LispIOException(e)
|
throw LispIOException(e)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue