title: Do you need to close streams if you close socket in Java?
body: <p>I've heard that calling 'socket.close()' automatically closes it's streams.</p>
  
  <p>Would:</p>
  
  <pre><code>public void close() {
       try {
            socket.close();
       }catch(IOException e) { }
  }
  </code></pre>
  
  <p>Have the same effect as:</p>
  
  <pre><code>public void close() {
       try {
            outputstream.close();
            inputstream.close();
            socket.close();
       }catch(IOException e) { }
  }
  </code></pre>
  
  <p>If your goal was to completely close the socket?</p>