Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
Socket s = new Socket("[URL unfurl="true"]www.acme.com",[/URL] 80);
OutputStream os = s.getOutputStream();
BufferedReader br = new BufferedReader(new InputStreamReader(s.getInputStream()));
PrintWriter pw = new PrintWriter(os);
pw.println("GET /primrose HTTP/1.1");
pw.println("Accept: text/html;");
pw.println("Connection: close;");
pw.println("\r\n\r\n");
// etc ... other headers & HTTP protocl implementation
pw.flush();
PrintWriter pw2 = new PrintWriter(new FileOutputStream("index_downloaded.html"));
String line = "";
while ((line = br.readLine()) != null) {
System.out.println(line);
pw2.println(line);
}
pw2.flush();
pw.close();
pw2.close();
br.close();
s.close();
PrintWriter pw2 = new PrintWriter(new FileOutputStream("index_downloaded.html"));
String line = "";
while ((line = br.readLine()) != null) {
System.out.println(line);
pw2.println(line);
}
pw2.flush();
pw.close();
pw2.close();
br.close();
s.close();
Socket s = new Socket("[URL unfurl="true"]www.acme.com",[/URL] 80);
OutputStream os = s.getOutputStream();
BufferedReader br = new BufferedReader(new InputStreamReader(s.getInputStream()));
PrintWriter pw = new PrintWriter(os);
pw.println("GET /primrose HTTP/1.1");// what it is doing ?
pw.println("Accept: text/html;"); // what it is doing?
pw.println("Connection: close;");
pw.println("\r\n\r\n");
// etc ... other headers & HTTP protocl implementation
pw.flush();
PrintWriter pw = new PrintWriter(os);
pw.println("GET /primrose HTTP/1.1");
pw.println("Accept: text/html;");
pw.println("Connection: close;");
pw.println("\r\n\r\n");
// etc ... other headers & HTTP protocl implementation