mirror of
https://github.com/quinton-ashley/java2js
synced 2024-12-29 10:11:54 +01:00
22 lines
378 B
JavaScript
Executable File
22 lines
378 B
JavaScript
Executable File
jdk.imports['java.io.InputStream'].load = async () => {
|
|
class InputStream {
|
|
constructor() {
|
|
this.reset();
|
|
let _this = this;
|
|
if (jdk.log) {
|
|
jdk.log.onkeyup = () => {
|
|
_this.stream = jdk.log.value;
|
|
};
|
|
}
|
|
}
|
|
reset() {
|
|
this.stream = '';
|
|
this.mark = 0;
|
|
}
|
|
read(length) {
|
|
this.mark += length;
|
|
}
|
|
}
|
|
jdk.java.io.InputStream = InputStream;
|
|
};
|