APIdia Launch Partner
Top Description Fields Constructors Methods
java.net

pack-priv Class HostPortrange

extends Object
Class Inheritance
Imports
java.util.Formatter, .Locale, sun.net.util.IPAddressUtil

Parses a string containing a host/domain name and port range

Field Summary

Modifier and TypeField and Description
pack-priv static final int
pack-priv String
pack-priv static final int[]
pack-priv static final int[]
pack-priv boolean
pack-priv boolean
pack-priv boolean
pack-priv static final int[]
pack-priv static final int
pack-priv static final int
pack-priv int[]
pack-priv String
pack-priv boolean

Constructor Summary

AccessConstructor and Description
pack-priv
HostPortrange(String scheme, String host)

Method Summary

Modifier and TypeMethod and Description
pack-priv int[]
pack-priv boolean
public int
hashCode()

Overrides java.lang.Object.hashCode.

Returns a hash code value for this object.

public String
public boolean
public boolean
public boolean
pack-priv int[]
public int[]
pack-priv static String
toLowerCase(String s)

Convert to lower case, and check that all chars are ascii alphanumeric, '-' or '.' only.

public boolean
wildcard()

returns true if the hostname part started with * hostname returns the remaining part of the host component eg "*.foo.com" -> ".foo.com" or "*" -> ""

Inherited from java.lang.Object:
cloneequalsfinalizegetClassnotifynotifyAlltoStringwaitwaitwait

Field Detail

CASE_DIFFback to summary
pack-priv static final int CASE_DIFF
hostnameback to summary
pack-priv String hostname
HTTP_PORTback to summary
pack-priv static final int[] HTTP_PORT
HTTPS_PORTback to summary
pack-priv static final int[] HTTPS_PORT
ipv4back to summary
pack-priv boolean ipv4
ipv6back to summary
pack-priv boolean ipv6
literalback to summary
pack-priv boolean literal
NO_PORTback to summary
pack-priv static final int[] NO_PORT
PORT_MAXback to summary
pack-priv static final int PORT_MAX
PORT_MINback to summary
pack-priv static final int PORT_MIN
portrangeback to summary
pack-priv int[] portrange
schemeback to summary
pack-priv String scheme
wildcardback to summary
pack-priv boolean wildcard

Constructor Detail

HostPortrangeback to summary
pack-priv HostPortrange(String scheme, String host)

Method Detail

defaultPortback to summary
pack-priv int[] defaultPort()
equalsback to summary
pack-priv boolean equals(HostPortrange that)
hashCodeback to summary
public int hashCode()

Overrides java.lang.Object.hashCode.

Doc from java.lang.Object.hashCode.

Returns a hash code value for this object. This method is supported for the benefit of hash tables such as those provided by java.util.HashMap.

The general contract of hashCode is:

  • Whenever it is invoked on the same object more than once during an execution of a Java application, the hashCode method must consistently return the same integer, provided no information used in equals comparisons on the object is modified. This integer need not remain consistent from one execution of an application to another execution of the same application.
  • If two objects are equal according to the equals method, then calling the hashCode method on each of the two objects must produce the same integer result.
  • It is not required that if two objects are unequal according to the equals method, then calling the hashCode method on each of the two objects must produce distinct integer results. However, the programmer should be aware that producing distinct integer results for unequal objects may improve the performance of hash tables.
hostnameback to summary
public String hostname()
ipv4Literalback to summary
public boolean ipv4Literal()
ipv6Literalback to summary
public boolean ipv6Literal()
literalback to summary
public boolean literal()
parsePortback to summary
pack-priv int[] parsePort(String port)
portrangeback to summary
public int[] portrange()
toLowerCaseback to summary
pack-priv static String toLowerCase(String s)

Convert to lower case, and check that all chars are ascii alphanumeric, '-' or '.' only.

wildcardback to summary
public boolean wildcard()

returns true if the hostname part started with * hostname returns the remaining part of the host component eg "*.foo.com" -> ".foo.com" or "*" -> ""