예제 #1
0
 private void updateAvailable() {
   buffer = new ArrayList<Byte>();
   try {
     while (serialStreams.available() > 0) buffer.add((byte) serialStreams.read());
   } catch (IOException e) {
     e.printStackTrace();
   }
 }
예제 #2
0
 public synchronized void send(byte[] bytes) throws IOException {
   for (byte b : bytes) serialStreams.write(b);
 }