mirror of
https://github.com/curioustorvald/Terrarum.git
synced 2026-03-07 12:21:52 +09:00
Former-commit-id: 8a1a21cc1ea874ec1c243cae7b1e920bdab3be4f Former-commit-id: ee7aeb05896a36960050f0656764ccf477e5f90d
15 lines
388 B
Kotlin
15 lines
388 B
Kotlin
package net.torvald.terrarum.virtualcomputer.terminal
|
|
|
|
import java.io.OutputStream
|
|
import java.io.PrintStream
|
|
|
|
/**
|
|
* Created by minjaesong on 16-09-10.
|
|
*/
|
|
class TerminalPrintStream(val term: Terminal) : PrintStream(TerminalOutputStream(term)) {
|
|
|
|
}
|
|
|
|
class TerminalOutputStream(val term: Terminal) : OutputStream() {
|
|
override fun write(b: Int) = term.printChar(b.and(0xFF).toChar())
|
|
} |