+ if (file == null)
+ return -1;
+ int c = libaltos.altos_getchar(file, 0);
+ if (Thread.interrupted())
+ return -1;
+ if (c == -1)
+ return -1;
+ if (AltosUIPreferences.serial_debug)
+ System.out.printf("%c", c);
+ if (log != null)
+ log.log_char(c);
+ return c;
+ }
+
+ public void write(char c) {
+ libaltos.altos_putchar(file, c);
+ }
+
+ public void flush() {
+ libaltos.altos_flush(file);