title: Convert Socket to String and vice versa
body: <p>I'm socket programming for Android (in Java).  How can I convert my socket to a string and convert that string representation back to a socket?</p>
  
  <p>For example, consider a <code>Socket ss</code>. What I want is some thing like this:</p>
  
  <pre><code>String strss = ss.tostring();
  </code></pre>
  
  <p>and later</p>
  
  <pre><code>Socket s = new Socket(strss);
  </code></pre>
  
  <p>I want to save the Socket (i.e. the details needed to recreate that socket later) into a database (as a string) and after that I need to reconvert it to Socket to use it in my app!</p>