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()
ProtocolProtocol as a Stringpublic final int getProto()
ProtocolProtocol as an intpublic final Collection<String> getAliases()
Protocol is also known by.Collection of Strings for aliases this ProtocolCopyright © 2016. All Rights Reserved.