title: Embedding image into HTML in java?
body: <p>I have this code where I am trying to read an image from Url:</p>
  
  <pre><code>   public class question_insert {
  public static String latex(String tex) throws IOException {
  
      String urltext = "http://chart.apis.google.com/chart?cht=tx&amp;chl="+tex;
  
      URL url = new URL(urltext);
      BufferedReader in = new BufferedReader(new InputStreamReader(url
              .openStream()));
      String inputLine;
  
      while ((inputLine = in.readLine()) != null) {
          // Process each line.
          System.out.println(inputLine.toString());
  
      }
      in.close();
  
      return inputLine;}
  </code></pre>
  
  <p>But what I am getting is unreadable code. The url gives only one image try this:</p>
  
  <p><code>http://chart.apis.google.com/chart?cht=tx&amp;chl=2+2%20\frac{3}{4}</code></p>
  
  <p>What should I do to embed the image into Html?</p>