/*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
/**
* Utility class to determine if a service can be found on the
* path that might be used to create a class loader.
*
* <p><b>This is NOT part of any supported API.
* If you write code that depends on this, you do so at your own risk.
* This code and its internal interfaces are subject to change or
* deletion without notice.</b>
*
*/
// based on sun.misc.Service
class ServiceProxy {
super(msg);
}
}
throws ServiceConfigurationError {
}
throws ServiceConfigurationError {
}
/**
* Parse the content of the given URL as a provider-configuration file.
*
* @param service
* The service class for which providers are being sought;
* used to construct error detail strings
*
* @param url
* The URL naming the configuration file to be parsed
*
* @return true if the name of a service is found
*
* @throws ServiceConfigurationError
* If an I/O error occurs while reading from the given URL, or
* if a configuration-file format error is detected
*/
BufferedReader r = null;
try {
in = u.openStream();
int lc = 1;
if (n != 0) {
}
return true;
}
}
} catch (FileNotFoundException x) {
return false;
} catch (IOException x) {
} finally {
try {
} catch (IOException y) {
}
try {
} catch (IOException y) {
}
}
return false;
}
/**
* Return true if a description for at least one service is found in the
* service configuration files in the given URLs.
*/
throws ServiceConfigurationError {
try {
if (found)
return true;
} catch (MalformedURLException e) {
// should not happen; ignore it if it does
}
}
return false;
}
}