public Protocol getProtocol(URI uri) throws ProtocolNotFoundException {
Protocol protocol = null;
try {
String protocolName = uri.getScheme();
if (protocolName == null) {
throw new ProtocolNotFoundException(uri);
}
protocol = getMap().get(protocolName);
} catch (ProtocolNotFoundException e) {
throw new ProtocolNotFoundException(uri, e.toString());
}
return protocol;
}