Writes data to a server specified when constructing the client, or writes data to the specific client obtained from the Server available() method. @webref client @usage application @webBrief Writes bytes , chars , ints , bytes[] , Strings @param data data to w
(int data)
| 650 | * @param data data to write |
| 651 | */ |
| 652 | public void write(int data) { // will also cover char |
| 653 | try { |
| 654 | output.write(data & 0xff); // for good measure do the & |
| 655 | output.flush(); // hmm, not sure if a good idea |
| 656 | |
| 657 | } catch (Exception e) { // null pointer or serial port dead |
| 658 | e.printStackTrace(); |
| 659 | stop(); |
| 660 | } |
| 661 | } |
| 662 | |
| 663 | |
| 664 | public void write(byte[] data) { |
nothing calls this directly
no test coverage detected