IT. Expert System.

Java Standard Edition (SE)

Miscellaneous changes to java.net


Miscellaneous changes to java.net worth mentioning:

Noteworthy bug fixes:

  • InetAddress
    A bug existed in JDK 1.0.2 where one could not create an InetAddress out of a IP address String (for example, "192.0.2.1") if a corresponding host name (for example, "www.example.com") could not be found. This resulted in an UnknownHostException. The bug is fixed in JDK 1.1. Additionally, when an InetAddress is created from an IP address, the corresponding hostname is not looked up until specifically requested (via InetAddress.getHostName()), as a performance enhancement.
  • ServerSocket/DatagramSocket close()
    A bug existed in JDK 1.0.2 where the close() method of ServerSocket and DatagramSocket were synchronized. The result was that if one thread were blocked indefinitely in DatagramSocket.receive() or ServerSocket.accept(), another thread couldn't break the blocking thread out by calling close(). This is fixed in JDK1.1 by making the close() methods unsynchronized.
  • URLConnection
    There was a bug in JDK 1.0.2 where the methods on URLConnection:
    • setRequestProperty()
    • getRequestProperty()
    • getHeaderField()
    • getHeaderFieldInt()
    • getContentLength()
    • getDate()
    etc, did not work. These are fixed in JDK 1.1.

Binding to local port/address:

  • Socket, ServerSocket, DatagramSocket
    These classes has overloaded constructors for binding to a specific local address and port. This is useful and necessary for applications like proxy servers that operate on multi-homed machines, and need particular control over which network interfaces are used.

MulticastSocket:

  • The MulticastSocket class was moved from package sun.net into the core API of java.net.

HttpURLConnection:

  • JDK1.1 introduces a new class, HttpURLConnection which extends URLConnection, and provides additional functionality specific to HTTP:
  • Ability to use all of the request methods with HTTP/1.1, like:
    • GET
    • POST
    • PUT
    • HEAD
    • TRACE
    • DELETE
    • OPTIONS
  • Control over whether to follow HTTP redirects.


Content

Android Reference

Java basics

Java Enterprise Edition (EE)

Java Standard Edition (SE)

SQL

HTML

PHP

CSS

Java Script

MYSQL

JQUERY

VBS

REGEX

C

C++

C#

Design patterns

RFC (standard status)

RFC (proposed standard status)

RFC (draft standard status)

RFC (informational status)

RFC (experimental status)

RFC (best current practice status)

RFC (historic status)

RFC (unknown status)

IT dictionary

License.
All information of this service is derived from the free sources and is provided solely in the form of quotations. This service provides information and interfaces solely for the familiarization (not ownership) and under the "as is" condition.
Copyright 2016 © ELTASK.COM. All rights reserved.
Site is optimized for mobile devices.
Downloads: 3943 / . Delta: 0.02058 с