亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? nonregisteringdriver.java

?? mysql jdbc驅(qū)動程序 mysql jdbc驅(qū)動程序 mysql jdbc驅(qū)動程序 mysql jdbc驅(qū)動程序
?? JAVA
?? 第 1 頁 / 共 2 頁
字號:
/* Copyright (C) 2002-2007 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of version 2 of the GNU General Public License as published by the Free Software Foundation. There are special exceptions to the terms and conditions of the GPL as it is applied to this software. View the full text of the exception in file EXCEPTIONS-CONNECTOR-J in the directory of this software distribution. This program 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 for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA */package com.mysql.jdbc;import java.io.IOException;import java.io.InputStream;import java.io.UnsupportedEncodingException;import java.net.URLDecoder;import java.sql.Connection;import java.sql.DriverPropertyInfo;import java.sql.SQLException;import java.util.ArrayList;import java.util.Iterator;import java.util.List;import java.util.Properties;import java.util.StringTokenizer;/** * The Java SQL framework allows for multiple database drivers. Each driver * should supply a class that implements the Driver interface *  * <p> * The DriverManager will try to load as many drivers as it can find and then * for any given connection request, it will ask each driver in turn to try to * connect to the target URL. * </p> *  * <p> * It is strongly recommended that each Driver class should be small and * standalone so that the Driver class can be loaded and queried without * bringing in vast quantities of supporting code. * </p> *  * <p> * When a Driver class is loaded, it should create an instance of itself and * register it with the DriverManager. This means that a user can load and * register a driver by doing Class.forName("foo.bah.Driver") * </p> *  * @author Mark Matthews * @version $Id: NonRegisteringDriver.java,v 1.1.2.1 2005/05/13 18:58:38 *          mmatthews Exp $ *  * @see org.gjt.mm.mysql.Connection * @see java.sql.Driver */public class NonRegisteringDriver implements java.sql.Driver {	private static final String REPLICATION_URL_PREFIX = "jdbc:mysql:replication://";	private static final String URL_PREFIX = "jdbc:mysql://";	private static final String MXJ_URL_PREFIX = "jdbc:mysql:mxj://";	private static final String LOADBALANCE_URL_PREFIX = "jdbc:mysql:loadbalance://";	/**	 * Key used to retreive the database value from the properties instance	 * passed to the driver.	 */	public static final String DBNAME_PROPERTY_KEY = "DBNAME";	/** Should the driver generate debugging output? */	public static final boolean DEBUG = false;	/** Index for hostname coming out of parseHostPortPair(). */	public final static int HOST_NAME_INDEX = 0;	/**	 * Key used to retreive the hostname value from the properties instance	 * passed to the driver.	 */	public static final String HOST_PROPERTY_KEY = "HOST";	/**	 * Key used to retreive the password value from the properties instance	 * passed to the driver.	 */	public static final String PASSWORD_PROPERTY_KEY = "password";	/** Index for port # coming out of parseHostPortPair(). */	public final static int PORT_NUMBER_INDEX = 1;	/**	 * Key used to retreive the port number value from the properties instance	 * passed to the driver.	 */	public static final String PORT_PROPERTY_KEY = "PORT";	public static final String PROPERTIES_TRANSFORM_KEY = "propertiesTransform";	/** Should the driver generate method-call traces? */	public static final boolean TRACE = false;	public static final String USE_CONFIG_PROPERTY_KEY = "useConfigs";	/**	 * Key used to retreive the username value from the properties instance	 * passed to the driver.	 */	public static final String USER_PROPERTY_KEY = "user";	/**	 * Gets the drivers major version number	 * 	 * @return the drivers major version number	 */	static int getMajorVersionInternal() {		return safeIntParse("@MYSQL_CJ_MAJOR_VERSION@"); //$NON-NLS-1$	}	/**	 * Get the drivers minor version number	 * 	 * @return the drivers minor version number	 */	static int getMinorVersionInternal() {		return safeIntParse("@MYSQL_CJ_MINOR_VERSION@"); //$NON-NLS-1$	}	/**	 * Parses hostPortPair in the form of [host][:port] into an array, with the	 * element of index HOST_NAME_INDEX being the host (or null if not	 * specified), and the element of index PORT_NUMBER_INDEX being the port (or	 * null if not specified).	 * 	 * @param hostPortPair	 *            host and port in form of of [host][:port]	 * 	 * @return array containing host and port as Strings	 * 	 * @throws SQLException	 *             if a parse error occurs	 */	protected static String[] parseHostPortPair(String hostPortPair)			throws SQLException {		int portIndex = hostPortPair.indexOf(":"); //$NON-NLS-1$		String[] splitValues = new String[2];		String hostname = null;		if (portIndex != -1) {			if ((portIndex + 1) < hostPortPair.length()) {				String portAsString = hostPortPair.substring(portIndex + 1);				hostname = hostPortPair.substring(0, portIndex);				splitValues[HOST_NAME_INDEX] = hostname;				splitValues[PORT_NUMBER_INDEX] = portAsString;			} else {				throw SQLError.createSQLException(Messages						.getString("NonRegisteringDriver.37"), //$NON-NLS-1$						SQLError.SQL_STATE_INVALID_CONNECTION_ATTRIBUTE);			}		} else {			splitValues[HOST_NAME_INDEX] = hostPortPair;			splitValues[PORT_NUMBER_INDEX] = null;		}		return splitValues;	}	private static int safeIntParse(String intAsString) {		try {			return Integer.parseInt(intAsString);		} catch (NumberFormatException nfe) {			return 0;		}	}	/**	 * Construct a new driver and register it with DriverManager	 * 	 * @throws SQLException	 *             if a database error occurs.	 */	public NonRegisteringDriver() throws SQLException {		// Required for Class.forName().newInstance()	}	/**	 * Typically, drivers will return true if they understand the subprotocol	 * specified in the URL and false if they don't. This driver's protocols	 * start with jdbc:mysql:	 * 	 * @param url	 *            the URL of the driver	 * 	 * @return true if this driver accepts the given URL	 * 	 * @exception SQLException	 *                if a database-access error occurs	 * 	 * @see java.sql.Driver#acceptsURL	 */	public boolean acceptsURL(String url) throws SQLException {		return (parseURL(url, null) != null);	}	//	// return the database name property	//	/**	 * Try to make a database connection to the given URL. The driver should	 * return "null" if it realizes it is the wrong kind of driver to connect to	 * the given URL. This will be common, as when the JDBC driverManager is	 * asked to connect to a given URL, it passes the URL to each loaded driver	 * in turn.	 * 	 * <p>	 * The driver should raise an SQLException if it is the right driver to	 * connect to the given URL, but has trouble connecting to the database.	 * </p>	 * 	 * <p>	 * The java.util.Properties argument can be used to pass arbitrary string	 * tag/value pairs as connection arguments.	 * </p>	 * 	 * <p>	 * My protocol takes the form:	 * 	 * <PRE>	 * 	 * jdbc:mysql://host:port/database	 * 	 * </PRE>	 * 	 * </p>	 * 	 * @param url	 *            the URL of the database to connect to	 * @param info	 *            a list of arbitrary tag/value pairs as connection arguments	 * 	 * @return a connection to the URL or null if it isnt us	 * 	 * @exception SQLException	 *                if a database access error occurs	 * 	 * @see java.sql.Driver#connect	 */	public java.sql.Connection connect(String url, Properties info)			throws SQLException {		if (url != null) {			if (StringUtils.startsWithIgnoreCase(url, LOADBALANCE_URL_PREFIX)) {				return connectLoadBalanced(url, info);			} else if (StringUtils.startsWithIgnoreCase(url,					REPLICATION_URL_PREFIX)) {				return connectReplicationConnection(url, info);			}		}		Properties props = null;		if ((props = parseURL(url, info)) == null) {			return null;		}		try {			Connection newConn = new com.mysql.jdbc.Connection(host(props),					port(props), props, database(props), url);			return newConn;		} catch (SQLException sqlEx) {			// Don't wrap SQLExceptions, throw			// them un-changed.			throw sqlEx;		} catch (Exception ex) {			throw SQLError.createSQLException(Messages					.getString("NonRegisteringDriver.17") //$NON-NLS-1$					+ ex.toString()					+ Messages.getString("NonRegisteringDriver.18"), //$NON-NLS-1$					SQLError.SQL_STATE_UNABLE_TO_CONNECT_TO_DATASOURCE);		}	}	private java.sql.Connection connectLoadBalanced(String url, Properties info)			throws SQLException {		Properties parsedProps = parseURL(url, info);		if (parsedProps == null) {			return null;		}		String hostValues = parsedProps.getProperty(HOST_PROPERTY_KEY);		List hostList = null;		if (hostValues != null) {			hostList = StringUtils.split(hostValues, ",", true);		}		if (hostList == null) {			hostList = new ArrayList();			hostList.add("localhost:3306");		}		LoadBalancingConnectionProxy proxyBal = new LoadBalancingConnectionProxy(				hostList, parsedProps);		return (java.sql.Connection) java.lang.reflect.Proxy.newProxyInstance(this				.getClass().getClassLoader(),				new Class[] { java.sql.Connection.class }, proxyBal);	}	private java.sql.Connection connectReplicationConnection(String url, Properties info)			throws SQLException {		Properties parsedProps = parseURL(url, info);		if (parsedProps == null) {			return null;		}		Properties masterProps = (Properties) parsedProps.clone();		Properties slavesProps = (Properties) parsedProps.clone();		// Marker used for further testing later on, also when		// debugging		slavesProps.setProperty("com.mysql.jdbc.ReplicationConnection.isSlave",				"true");		String hostValues = parsedProps.getProperty(HOST_PROPERTY_KEY);		if (hostValues != null) {			StringTokenizer st = new StringTokenizer(hostValues, ",");			StringBuffer masterHost = new StringBuffer();			StringBuffer slaveHosts = new StringBuffer();			if (st.hasMoreTokens()) {				String[] hostPortPair = parseHostPortPair(st.nextToken());				if (hostPortPair[HOST_NAME_INDEX] != null) {					masterHost.append(hostPortPair[HOST_NAME_INDEX]);				}				if (hostPortPair[PORT_NUMBER_INDEX] != null) {					masterHost.append(":");					masterHost.append(hostPortPair[PORT_NUMBER_INDEX]);				}			}			boolean firstSlaveHost = true;			while (st.hasMoreTokens()) {				String[] hostPortPair = parseHostPortPair(st.nextToken());				if (!firstSlaveHost) {					slaveHosts.append(",");				} else {					firstSlaveHost = false;				}				if (hostPortPair[HOST_NAME_INDEX] != null) {					slaveHosts.append(hostPortPair[HOST_NAME_INDEX]);				}				if (hostPortPair[PORT_NUMBER_INDEX] != null) {					slaveHosts.append(":");					slaveHosts.append(hostPortPair[PORT_NUMBER_INDEX]);				}			}			if (slaveHosts.length() == 0) {				throw SQLError						.createSQLException(

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
日本vs亚洲vs韩国一区三区| 91福利在线导航| 欧美一区二区三区性视频| 日韩美女啊v在线免费观看| 国产成+人+日韩+欧美+亚洲| 精品免费日韩av| 精品一区二区免费| 国产视频一区在线播放| 国产一区二区久久| 2023国产精华国产精品| 成人综合婷婷国产精品久久蜜臀 | 一本一道久久a久久精品| 国产精品日产欧美久久久久| 国产成人精品一区二区三区四区| 久久久91精品国产一区二区精品 | 精品久久久三级丝袜| 国产在线精品免费| 综合激情成人伊人| 91.xcao| 国产一区二区三区免费播放| 中文在线资源观看网站视频免费不卡 | 一区在线播放视频| 91视视频在线直接观看在线看网页在线看| 国产精品免费久久久久| 一本到不卡免费一区二区| 天堂va蜜桃一区二区三区| 日本一区二区视频在线观看| 欧洲激情一区二区| 成人一级视频在线观看| 亚洲综合一区在线| 一色屋精品亚洲香蕉网站| 精品国产乱码久久久久久浪潮| 91麻豆精品秘密| 国产suv精品一区二区883| 日韩电影一区二区三区四区| 中文字幕人成不卡一区| 日韩精品一区二区三区在线| 欧美日韩国产一区二区三区地区| jlzzjlzz亚洲女人18| 国产剧情av麻豆香蕉精品| 亚洲成人av一区二区| 亚洲精品国产视频| 一区二区三区在线视频免费| 亚洲免费色视频| 亚洲国产精品精华液2区45| 26uuu国产在线精品一区二区| 日韩一级免费观看| 亚洲乱码国产乱码精品精可以看| 欧美一区二区三区在| 日韩免费福利电影在线观看| 色综合一个色综合亚洲| 99精品视频一区| 丁香激情综合国产| 色又黄又爽网站www久久| 国产91在线|亚洲| 国产福利一区二区三区视频| 久久精品国产一区二区| 九色综合狠狠综合久久| 麻豆极品一区二区三区| 国产精品91xxx| 色网站国产精品| 7777女厕盗摄久久久| 欧美激情一区在线| 一区二区三区在线播| 视频一区二区国产| 不卡影院免费观看| 欧美一二三在线| 一区精品在线播放| 日本v片在线高清不卡在线观看| 国产风韵犹存在线视精品| 色婷婷综合久久久中文字幕| 678五月天丁香亚洲综合网| 久久久久高清精品| 午夜私人影院久久久久| 91丨国产丨九色丨pron| 日韩亚洲欧美成人一区| 亚洲免费在线观看| 懂色av一区二区三区蜜臀| 欧美日韩在线一区二区| 亚洲国产精品av| 极品少妇一区二区| 欧美精选午夜久久久乱码6080| 国产精品卡一卡二卡三| 久久国产精品99久久久久久老狼 | 国产精品午夜免费| 六月丁香婷婷色狠狠久久| 欧美视频在线一区| 亚洲一区在线视频| 色综合一个色综合| 中文字幕色av一区二区三区| 国产成人在线网站| 久久久久久久久久久99999| 日本欧洲一区二区| 欧美日本国产视频| 亚洲一区在线观看视频| 色综合一区二区| 亚洲国产一区在线观看| 99国产精品久| 亚洲一区二区三区影院| 欧美撒尿777hd撒尿| 香蕉影视欧美成人| 欧美一级二级在线观看| 免费成人在线观看视频| 欧美电影免费观看高清完整版| 日本成人在线电影网| 日韩欧美精品三级| 国产精品18久久久久久vr| 欧美激情一区二区三区在线| 91丨九色丨蝌蚪丨老版| 午夜国产精品一区| 精品国精品国产| 成人av在线资源网站| 午夜av一区二区| 国产午夜精品久久久久久免费视| 99riav久久精品riav| 秋霞午夜鲁丝一区二区老狼| 久久午夜老司机| 欧美色视频一区| 粉嫩蜜臀av国产精品网站| 亚洲综合在线观看视频| 久久综合久久鬼色| 欧美性欧美巨大黑白大战| 国产在线精品一区二区不卡了| 亚洲情趣在线观看| 精品国产乱码久久久久久夜甘婷婷 | 香港成人在线视频| 久久亚洲免费视频| 欧美乱熟臀69xxxxxx| 不卡的av中国片| 久久99久久久久| 亚洲电影激情视频网站| 国产色爱av资源综合区| 欧美军同video69gay| 色婷婷av一区二区三区gif | 日韩欧美高清在线| 91美女片黄在线观看91美女| 国产一区二区导航在线播放| 日韩精品1区2区3区| 亚洲精品免费看| 亚洲欧美自拍偷拍| 综合av第一页| 国产精品久久久久影院| 国产精品美女视频| 国产精品国产a级| 国产免费久久精品| 国产精品麻豆久久久| 久久久国产午夜精品| 欧美一级夜夜爽| 精品国产123| 欧美一级一区二区| 欧美mv日韩mv国产| 91精品国产综合久久精品app| 欧美高清视频一二三区 | 99国产精品99久久久久久| 91尤物视频在线观看| 一本一道久久a久久精品| 欧美色偷偷大香| 欧美电影免费提供在线观看| 久久精品亚洲麻豆av一区二区| 中文av一区二区| 亚洲va国产天堂va久久en| 日韩国产欧美在线观看| 国产乱人伦精品一区二区在线观看 | 精品电影一区二区三区 | 中文字幕一区在线观看视频| 一区二区三区日韩精品| 国产乱国产乱300精品| 色综合久久久久久久久久久| 91精品国产综合久久精品麻豆| 国产欧美精品国产国产专区| 一区二区三区中文在线观看| 国产一区二区精品久久| 欧美天堂一区二区三区| 欧美激情中文字幕| 蜜桃av噜噜一区二区三区小说| 97超碰欧美中文字幕| 精品国产髙清在线看国产毛片 | 精品日韩欧美在线| 亚洲一区二区三区中文字幕在线| 久久国产精品色婷婷| 欧美日韩在线播放三区| 亚洲精品中文在线影院| 国产在线播精品第三| 欧美一区二区三区白人| 夜夜嗨av一区二区三区中文字幕| 国产成人精品影院| 久久亚区不卡日本| 久久精品99国产精品| 日韩欧美aaaaaa| 久久精品理论片| 精品理论电影在线观看| 精品一区免费av| 欧美电影免费观看高清完整版| 欧美96一区二区免费视频| 678五月天丁香亚洲综合网| 日韩福利视频网| 亚洲精品一线二线三线无人区| 极品销魂美女一区二区三区| 欧美大片顶级少妇| 成人网在线播放|