title: How to read/write a 2d char array through a Socket?
body: <p>So I am writing a game of LAN tic-tac-toe. I have the "board" stored as a 2 dimensional <code>char</code> array. I want to be able to send and receive this array through Sockets. I am currently using a <code>InputStream</code> and <code>OutputStream</code> to send single bytes. However, I don't think this will work for sending the array. Also, these streams only seem capable of sending <code>int</code> type data. Can someone please explain to me how too send 2 dimensional <code>char</code> arrays over sockets using I/O streams. Example code would be great! Thanks. </p>
  
  <p><strong>Current Code:</strong></p>
  
  <pre><code>public void communicate() {
      try {
          OutputStream os = client.getOutputStream();
          InputStream is = client.getInputStream();
      }
  
      while (gameOver == false) {
          char[][] board = new char[3][3];
          try {
              os.write(board); //this dosen't work, only sends non-array int types. 
          } catch (IOException e) {
  
              e.printStackTrace();
          }
  
      }
  }
  </code></pre>