title: How to Read Specific data from to InputStream object?
body: <p>How to read Specific data from InputStream object, While i am using HttpUrlConnection object to make connection. I want to READ and POST data ,for example , i want to read specific Tag data , like  and so on. like wise i want to Post also.</p>
  
  <pre><code>public class Test {
  
  public static void main(String[] args) throws Exception {
  
      HttpsURLConnection con = (HttpsURLConnection) new URL("some URL ...")
              .openConnection();
  
      // reading data from connection
      InputStream in = new BufferedInputStream(con.getInputStream());
      System.out.println(readStream(in));
  
  }
  private static String readStream(InputStream is) {
      try {
        ByteArrayOutputStream bo = new ByteArrayOutputStream();
        int i = is.read();
        while(i != -1) {
          bo.write(i);
          i = is.read();
        }
        return bo.toString();
      } catch (IOException e) {
        return "";
      }
  }
  </code></pre>
  
  <p>}</p>
  
  <p>please help..</p>