THIS IS A TEST INSTANCE. ALL YOUR CHANGES WILL BE LOST!!!!
...
Code Block | ||
---|---|---|
| ||
byte[] delim = new byte[] {0}; try ( // Connect to server Socket sock = new Socket(InetAddress.getLocalHost(), 5555); OutputStream oos = new BufferedOutputStream(sock.getOutputStream()) ) { for (String word : words) { String item = word + "=1"; byte[] arr = item.getBytes(); // Write message. oos.write(arr); // Write delimiter. oos.write(delim); } } |
...
The following steps should be done in order to implement custom data streamer: