Networking Enhancements in Java SE 8
-  A new class java.net.URLPermissionhas been added.URLPermissionrepresents a permission for accessing a resource (or set 
of resources) defined by a given URL, and for a given set of user-settable request methods and 
request headers.
- 
The jdk.netpackage has been added that contains platform specific
socket options and a mechanism for setting these options on all of the
standard socket types. The socket options are defined injdk.net.ExtendedSocketOptionsand the first one to be defined isSO_FLOW_SLA, which is an option for establishing
socket flows for multitennant applications. The classjdk.net.Socketsprovides the mechanism for setting and getting these extended options.
- 
In class HttpURLConnection, if a security manager is installed, and if a method is called which 
results in an attempt to open a connection, the caller must possess either:
 If automatic redirection is enabled, and this request is redirected to another destination, then the caller must also have permission to connect to the redirected host/URL.