public final class Protocol extends Object
Modifier and Type | Method and Description |
---|---|
Collection<String> |
getAliases()
Returns a list of aliases this
Protocol is also known by. |
String |
getName()
Returns the official IANA name of this
Protocol |
int |
getProto()
Returns the official IANA protocol number for this
Protocol |
static Protocol |
getProtocolByName(String name)
Locates a protocol by name.
|
static Protocol |
getProtocolByNumber(int proto)
Locates a protocol by number.
|
String |
toString() |
public static final Protocol getProtocolByName(String name)
name
- the official IANA name for the protocol, or an alias.Protocol
instance, or null
if the protocol could not be found.public static final Protocol getProtocolByNumber(int proto)
proto
- the internet protocol number of the protocol.Protocol
instance, or null
if the protocol could not be found.public final String getName()
Protocol
Protocol
as a String
public final int getProto()
Protocol
Protocol
as an int
public final Collection<String> getAliases()
Protocol
is also known by.Collection
of Strings for aliases this Protocol
Copyright © 2018. All rights reserved.