title: How to identify the input for the server is of InputStream or Output stream
body: <p>I have a <code>ServerSocket</code> and looking for help.<br>
   I want to identify the request from the client of type <code>InputStream</code> or <code>OutputStream</code>. I am stuck with this point and looking forward to your help</p>
  
  <pre><code>ServerSocket servsock = new ServerSocket(13267);
  while (true) {
       System.out.println("Waiting...");
  
       Socket sock = servsock.accept();
       System.out.println("Accepted connection : " + sock);
  
       InputStream is = sock.getInputStream();
       new FileServer().receiveFile(is);
       sock.close();
   }
  </code></pre>
  
  <p>Please tell me how can I put it in a conditional statement to provide the further execution</p>