SocketAddress

  • SocketAddress is an abstract class representing a socket address without a specific protocol.

  • It's designed to be subclassed for protocol-specific implementations like InetSocketAddress.

  • This immutable class is used by sockets for binding, connecting, or as return values.

  • InetSocketAddress is a direct subclass implementing IP Socket Address with hostname and port.

  • SocketAddress provides a way to represent socket addresses for network communication in Java.

public abstract class SocketAddress extends Object
implements Serializable
Known Direct Subclasses

This class represents a Socket Address with no protocol attachment. As an abstract class, it is meant to be subclassed with a specific, protocol dependent, implementation.

It provides an immutable object used by sockets for binding, connecting, or as returned values.

Public Constructor Summary

Inherited Method Summary

Public Constructors

public SocketAddress ()