( begin auto-generated from Client_write.xml ) Writes data to a server specified when constructing the client. ( end auto-generated ) @webref client:client @usage application @brief Writes bytes, chars, ints, bytes[], Strings @param data data to write
(int data)
| 672 | * @param data data to write |
| 673 | */ |
| 674 | public void write(int data) { // will also cover char |
| 675 | try { |
| 676 | output.write(data & 0xff); // for good measure do the & |
| 677 | output.flush(); // hmm, not sure if a good idea |
| 678 | |
| 679 | } catch (Exception e) { // null pointer or serial port dead |
| 680 | //errorMessage("write", e); |
| 681 | //e.printStackTrace(); |
| 682 | //dispose(); |
| 683 | //disconnect(e); |
| 684 | e.printStackTrace(); |
| 685 | stop(); |
| 686 | } |
| 687 | } |
| 688 | |
| 689 | |
| 690 | public void write(byte data[]) { |
nothing calls this directly
no test coverage detected