private void handleBinaryData(int size) throws IOException
   {
      byte[] data = new byte[size];
      int bytesRead = source.read(data);
      if (bytesRead != size)
      {
         throw new EOFException();
      }
      listener.processBinaryBytes(data);
   }