Methods Summary |
---|
public boolean | equals(java.lang.Object o)Compares this ProtocolVersion to the specified object.
if (o instanceof ProtocolVersion
&& this.version[0] == ((ProtocolVersion) o).version[0]
&& this.version[1] == ((ProtocolVersion) o).version[1]) {
return true;
}
return false;
|
public static org.apache.harmony.xnet.provider.jsse.ProtocolVersion | getByName(java.lang.String name)Returns ProtocolVersion
return (ProtocolVersion) protocolsByName.get(name);
|
public static org.apache.harmony.xnet.provider.jsse.ProtocolVersion | getByVersion(byte[] version)Returns ProtocolVersion
if (version[0] == 3) {
if (version[1] == 1) {
return TLSv1;
}
if (version[1] == 0) {
return SSLv3;
}
}
return null;
|
public static org.apache.harmony.xnet.provider.jsse.ProtocolVersion | getLatestVersion(java.lang.String[] protocols)Highest protocol version supported by provider implementation
if (protocols == null || protocols.length == 0) {
return null;
}
ProtocolVersion latest = getByName(protocols[0]);
ProtocolVersion current;
for (int i = 1; i < protocols.length; i++) {
current = getByName(protocols[i]);
if (current == null) {
continue;
}
if ((latest == null)
|| (latest.version[0] < current.version[0])
|| (latest.version[0] == current.version[0] && latest.version[1] < current.version[1])) {
latest = current;
}
}
return latest;
|
public static boolean | isSupported(byte[] version)Returns true if protocol version is supported
if (version[0] != 3 || (version[1] != 0 && version[1] != 1)) {
return false;
}
return true;
|
public static boolean | isSupported(java.lang.String name)Returns true if provider supports protocol version
return protocolsByName.containsKey(name);
|