Import Jav Export Java

1116 WordsDec 3, 20145 Pages
import java.io.BufferedReader; import java.io.DataOutputStream; import java.io.IOException; import java.io.InputStreamReader; import java.net.InetAddress; import java.net.MalformedURLException; import java.net.Socket; import java.net.URL; import java.net.UnknownHostException; import java.util.ArrayList; import java.util.Iterator; import java.util.List; /** * <b>CS 4590</b><br> * Program 3: Write a Web Browser application </br></br> * <b>Description:</b></br> <b>BrowserClient</b> class creates an HTTP request * based on the user input and parses the received HTTP response.</br> * * @author Gunta Smidlere Nov 28, 2013 */ // http://www.mcs.csueastbay.edu/~leann/Pgm3/camp.html // http://www.mcs.csueastbay.edu/~leann/Pgm3/start.html // http://www.mcs.csueastbay.edu/~leann/Pgm3/beach.html // http://www.mcs.csueastbay.edu/~leann/Pgm3/bbq.html public class BrowserClient { private static String text, protocol, host, path, relativeURL; private static int linkCounter = 0; private static List<String> linkList = new ArrayList<String>(); private static URL absoluteURL; public static void processRequest(String url) { int startTag = 0, endTag = 0, startALT = 0, endAltText = 0, startAltText = 0; int startHREF = 0, endHrefText = 0, startHrefText = 0, startOfNextAttr = 0; boolean httpBodyFlag = false; Socket browserSocket; InetAddress address; String line, tmpLine = "", extractALT = "", extractHREF = "", extractHrefLabel = ""; DataOutputStream os = null;

More about Import Jav Export Java

Open Document