+ public void putc(char c) {
+ if (altos != null)
+ libaltos.altos_putchar(altos, c);
+ }
+
+ public void print(String data) {
+// System.out.printf("\"%s\" ", data);
+ for (int i = 0; i < data.length(); i++)
+ putc(data.charAt(i));
+ }
+
+ public void printf(String format, Object ... arguments) {
+ print(String.format(format, arguments));
+ }
+
+ private void open() throws FileNotFoundException, AltosSerialInUseException {
+ synchronized (devices_opened) {
+ if (devices_opened.contains(device.getPath()))
+ throw new AltosSerialInUseException(device);
+ devices_opened.add(device.getPath());