Top Fields Constructors Methods
io.vertx.core.net.impl

public Class HostAndPortImpl

extends Object
implements HostAndPort
Class Inheritance
All Implemented Interfaces
io.vertx.core.net.HostAndPort
Imports
java.util.Arrays, io.vertx.core.net.HostAndPort

Field Summary

Modifier and TypeField and Description
private static final byte[]
private final String
private final int

Constructor Summary

AccessConstructor and Description
public
HostAndPortImpl(String host, int port)

Method Summary

Modifier and TypeMethod and Description
private static int
foo(int v)

public String
private static boolean
isALPHA(char ch)

private static boolean
isDIGIT(char ch)

pack-priv static boolean
isHEXDIG(char ch)

private static boolean
isSubDelims(char ch)

private static boolean
isUnreserved(char ch)

public static boolean

Returns:

true when the string is a valid authority
isValidAuthority
(String
the string to parse
s
)

Validate an authority HTTP header, that is host [':' port] This method should behave like parseAuthority(String, int), but without the overhead of creating an object: when true parseAuthority(s, -1) should return a non-null value.

public static HostAndPortImpl

Returns:

the parsed value or null when the string cannot be parsed
parseAuthority
(String
the string to parse
s
,
int
the scheme port used when the optional port is not specified
schemePort
)

Hides io.vertx.core.net.HostAndPort.parseAuthority.

Parse an authority HTTP header, that is host [':' port]

pack-priv static int
parseDecOctet(String s, int from, int to)

private static int
parseDigit(String s, int from, int to)

public static int
parseHost(String val, int from, int to)

public static int
parseIPLiteral(String s, int from, int to)

public static int
parseIPv4Address(String s, int from, int to)

private static int
parsePort(String s, int pos)

public static int
parseRegName(String s, int from, int to)

public int
public String
toString()

Overrides java.lang.Object.toString.

Returns a string representation of the object.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAllwaitwaitwait

Field Detail

DIGITSback to summary
private static final byte[] DIGITS
hostback to summary
private final String host
portback to summary
private final int port

Constructor Detail

HostAndPortImplback to summary
public HostAndPortImpl(String host, int port)

Method Detail

fooback to summary
private static int foo(int v)
hostback to summary
public String host()

Implements io.vertx.core.net.HostAndPort.host.

Returns:String

Doc from io.vertx.core.net.HostAndPort.host.

the host value

isALPHAback to summary
private static boolean isALPHA(char ch)
isDIGITback to summary
private static boolean isDIGIT(char ch)
isHEXDIGback to summary
pack-priv static boolean isHEXDIG(char ch)
isSubDelimsback to summary
private static boolean isSubDelims(char ch)
isUnreservedback to summary
private static boolean isUnreserved(char ch)
isValidAuthorityback to summary
public static boolean isValidAuthority(String s)

Validate an authority HTTP header, that is host [':' port]
This method should behave like parseAuthority(String, int), but without the overhead of creating an object: when true parseAuthority(s, -1) should return a non-null value.

Parameters
s:String

the string to parse

Returns:boolean

true when the string is a valid authority

Exceptions
NullPointerException:
when the string is null
parseAuthorityback to summary
public static HostAndPortImpl parseAuthority(String s, int schemePort)

Hides io.vertx.core.net.HostAndPort.parseAuthority.

Parse an authority HTTP header, that is host [':' port]

Parameters
s:String

the string to parse

schemePort:int

the scheme port used when the optional port is not specified

Returns:HostAndPortImpl

the parsed value or null when the string cannot be parsed

parseDecOctetback to summary
pack-priv static int parseDecOctet(String s, int from, int to)
parseDigitback to summary
private static int parseDigit(String s, int from, int to)
parseHostback to summary
public static int parseHost(String val, int from, int to)
parseIPLiteralback to summary
public static int parseIPLiteral(String s, int from, int to)
parseIPv4Addressback to summary
public static int parseIPv4Address(String s, int from, int to)
parsePortback to summary
private static int parsePort(String s, int pos)
parseRegNameback to summary
public static int parseRegName(String s, int from, int to)
portback to summary
public int port()

Implements io.vertx.core.net.HostAndPort.port.

Returns:int

Doc from io.vertx.core.net.HostAndPort.port.

the port value or -1 when not specified

toStringback to summary
public String toString()

Overrides java.lang.Object.toString.

Doc from java.lang.Object.toString.

Returns a string representation of the object. Satisfying this method's contract implies a non-null result must be returned.

Returns:String

a string representation of the object

Annotations
@Override