Advertisement
Heruberuto

Untitled

May 23rd, 2017
70
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.42 KB | None | 0 0
  1. private void writeAssignedChannel(SelectionKey key, Selector sel) throws IOException {
  2.         if (key.attachment() == null) {
  3.             key.attach(new StringBuilder());
  4.         }
  5.         StringBuilder builder = (StringBuilder) key.attachment();
  6.  
  7.  
  8.         String data = ByteBufferUtil.readFromChannelBuffered(channel);
  9.         stringBuilder.append(data);
  10.         if (data.endsWith(delimiter)) {
  11.  
  12.         }
  13. //TODO
  14.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement