0

Can anyone help me to convert this java code to vb6 code?

import java.net.*;
import java.io.*;
class read_web  {
static void main(String[] url) {
    String web = "http://www.website.com";
    String vs="",us = "";
    try {
          URL website = new URL(web);
          URLConnection conn = website.openConnection();
          BufferedReader in = new BufferedReader(
                               new InputStreamReader(
                               conn.getInputStream()));
          vs = in.readLine();
          while (vs != null) {
            us+=vs + "\n";
            vs = in.readLine();
          }
        } catch (Exception e) {
          System.out.println("Exception: " + e);
        }
    char[] an_html = new char[us.length()];
    boolean html = true;
    for(int i=0;i<us.length();i++) {
      if(us.charAt(i)=='>') html=false;
      if(!html) an_html[i] = us.charAt(i);
      if(us.charAt(i)=='<') html=true;
    }
    String str = String.copyValueOf(an_html);
    System.out.println(str);
  }
}
2
Contributors
1
Reply
2
Views
6 Years
Discussion Span
Last Post by debasisdas
This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.