Java Networking - URLConnection

March 24, 2018 Oclemy Java URLConnection 0 minutes, 27 seconds

URLConnection is a java class used to connect to a URL and perform reads and writes.

Uses of URLConnection

Well, connect to a URL then write to or read from it.

Characteristics of URLConnection class

  1. First it belongs to java.net package.
  2. It's an abstract class:
    public abstract class URLConnection..{}
  3. It derives from java.lang.Object:
    public abstract class URLConnection extends Object{}

URLConnection children

This class has several children:

Class Type Description
HttpURLConnection Direct URLConnection for HTTP.
JarURLConnection Direct URLConnection for jars
HttpsURLConnection Indirect This is the HttpURLConnection for HTTPS.

Comments