title: Sending objects through Java NIO non-blocking sockets
body: <p>I am getting an exception when trying to use:</p>
  
  <pre><code>oos = new ObjectOutputStream(socketChannel.socket().getOutputStream());
  oos.writeObject(o);
  </code></pre>
  
  <p>And this raises the exception:</p>
  
  <pre><code>java.nio.channels.IllegalBlockingModeException
  </code></pre>
  
  <p>Is it impossible to pass objects in non-blocking sockets?
  If it is, how should I proceed on passing message objects through the socket channels?</p>
  
  <p>I've looked other places for this answer but couldn't find one...</p>