20165317 ninth week study summary

Textbook content

URL class:

The URL class in the java.net package is an abstraction of the Uniform Resource Locator. The application program that uses the URL to create an object is called a client program. The URL object of the client program can call the InputStream openStream() method to return an input stream. The stream points to the resources contained in the URL object, and the resource information on the server can be read into the client through this input stream.

  • 构造方法1
    ```
    try { URL url = new URL("http://www.google.com");
    }
    catch(MalformedURLException e) {
    System.out.println("Bad URL:"+url);
    }

```

  • 构造方法2
    public URL(String protocol,String host,String file) throws MalformedURLException

InetAddress class to get the address

socket

ServerSocket objects and server-side sockets

Use multithreading technology

Datagram

java remote call

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325066983&siteId=291194637