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

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? driver.java

?? 關于jdbc對mysql的官方驅動程序
?? JAVA
字號:
/*
 * MM JDBC Drivers for MySQL
 *
 * $Id: Driver.java,v 1.3 1998/08/25 04:03:36 mmatthew Exp $
 *
 * Copyright (C) 1998 Mark Matthews <mmatthew@worldserver.com>
 * 
 * This library is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Library General Public
 * License as published by the Free Software Foundation; either
 * version 2 of the License, or (at your option) any later version.
 *
 * This library 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
 * Library General Public License for more details.
 * 
 * You should have received a copy of the GNU Library General Public
 * License along with this library; if not, write to the
 * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
 * Boston, MA  02111-1307, USA.
 *
 * See the COPYING file located in the top-level-directory of
 * the archive of this library for complete text of license.
 */

/**
 * 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>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>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")
 *
 * @see org.gjt.mm.mysql.Connection
 * @see java.sql.Driver
 * @author Mark Matthews <mmatthew@worldserver.com>
 * @version $Id$
 */

package org.gjt.mm.mysql;

import java.sql.*;
import java.util.*;

public class Driver implements java.sql.Driver
{
    //
    // Register ourselves with the DriverManager
    //
    
    static
    {
	try {
	    java.sql.DriverManager.registerDriver(new Driver());
	} 
	catch (java.sql.SQLException E) {
	    E.printStackTrace();
	}
    }
    
    private Properties _Props      = null;
    
    //
    // Version Info
    //

    static final int _MAJORVERSION = 1;
    static final int _MINORVERSION = 2;
    
    static final boolean debug = false;
    static final boolean trace = false;
    
    /**
     * Construct a new driver and register it with DriverManager
     *
     * @exception java.sql.SQLException
     */
    
    public Driver() throws java.sql.SQLException
    {
    }
    
    /**
     * 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 java.sql.SQLException if it is the right driver
     * to connect to the given URL, but has trouble connecting to the
   * database.
   *
   * <p>The java.util.Properties argument can be used to pass arbitrary
   * string tag/value pairs as connection arguments.
   *
   * My protocol takes the form:
   * <PRE>
   *    jdbc:mysql://host:port/database
   * </PRE>
   *
   * @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 java.sql.SQLException if a database access error occurs
   * @see java.sql.Driver#connect
   */

    public synchronized java.sql.Connection connect(String Url, Properties Info) 
	throws java.sql.SQLException
    {
		if ((_Props = parseURL(Url, Info)) == null) {
		    return null;
		}
		else {
		    return new Connection (host(), port(), _Props, database(), Url, this);
		}
    }
 
    /**
     * Returns true if the driver thinks it can open a connection to the
     * given URL.  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:
     *
     * @see java.sql.Driver#acceptsURL
     * @param url the URL of the driver
     * @return true if this driver accepts the given URL
     * @exception java.sql.SQLException if a database-access error occurs
     */

    public synchronized boolean acceptsURL(String Url) throws java.sql.SQLException
    {
	if (parseURL(Url, null) == null) {
	    return false;
	}
	else {
	    return true;
	}
    }

    /**
     * The getPropertyInfo method is intended to allow a generic GUI
     * tool to discover what properties it should prompt a human for
     * in order to get enough information to connect to a database.
     *
     * <p>Note that depending on the values the human has supplied so
     * far, additional values may become necessary, so it may be necessary
     * to iterate through several calls to getPropertyInfo
     *
     * @param url the Url of the database to connect to
     * @param info a proposed list of tag/value pairs that will be sent on
     *    connect open.
     * @return An array of DriverPropertyInfo objects describing
     *    possible properties.  This array may be an empty array if
     *    no properties are required
     * @exception java.sql.SQLException if a database-access error occurs
     * @see java.sql.Driver#getPropertyInfo
     */

    public DriverPropertyInfo[] getPropertyInfo(String Url, Properties Info) 
	throws java.sql.SQLException
    {
		if (_Props == null) {
			_Props = new Properties();
		}
		
	DriverPropertyInfo HostProp =
	    new DriverPropertyInfo("HOST", _Props.getProperty("HOST"));
	HostProp.required = true;
	
	HostProp.description = "Hostname of MySQL Server";

	DriverPropertyInfo PortProp =
	    new DriverPropertyInfo("PORT", _Props.getProperty("PORT", "3306"));
	PortProp.required = false;
	PortProp.description = "Port number of MySQL Server";
	
	DriverPropertyInfo DBProp = 
	    new DriverPropertyInfo("DBNAME", _Props.getProperty("DBNAME"));
	DBProp.required = false;
	DBProp.description = "Database name"; 

	DriverPropertyInfo UserProp = 
	    new DriverPropertyInfo("user", Info.getProperty("user"));
	UserProp.required = true;
	UserProp.description = "Username to authenticate as";

	DriverPropertyInfo PasswordProp =
	    new DriverPropertyInfo("password", Info.getProperty("password"));
	PasswordProp.required = true;
	PasswordProp.description =  "Password to use for authentication";

	DriverPropertyInfo AutoReconnect =
	    new DriverPropertyInfo("autoReconnect", Info.getProperty("autoReconnect", "false"));
	AutoReconnect.required = false;
	AutoReconnect.choices = new String[] {"true", "false"};
	AutoReconnect.description = "Should the driver try to re-establish bad connections?";

	DriverPropertyInfo MaxReconnects =
	    new DriverPropertyInfo("maxReconnects", Info.getProperty("maxReconnects", "3"));
	MaxReconnects.required = false;
	MaxReconnects.description = "Maximum number of reconnects to attempt if autoReconnect is true"; ;

	DriverPropertyInfo InitialTimeout =
	    new DriverPropertyInfo("initialTimeout", Info.getProperty("initialTimeout", "2"));
	InitialTimeout.required = false;
	InitialTimeout.description = "Initial timeout (seconds) to wait between failed connections"; 
       
	DriverPropertyInfo Dpi[] = {HostProp,
				    PortProp,
				    DBProp,
				    UserProp,
				    PasswordProp,
				    AutoReconnect,
				    MaxReconnects,
				    InitialTimeout};
	return Dpi;
    }
  
    /**
     * Gets the drivers major version number
     *
     * @return the drivers major version number
     */

    public int getMajorVersion()
    {
	return _MAJORVERSION;
    }

    /**
     * Get the drivers minor version number
     *
     * @return the drivers minor version number
     */

    public int getMinorVersion()
    {
	return _MINORVERSION;
    }

    /**
     * Report whether the driver is a genuine JDBC compliant driver.  A
     * driver may only report "true" here if it passes the JDBC compliance
     * tests, otherwise it is required to return false.  JDBC compliance
     * requires full support for the JDBC API and full support for SQL 92
     * Entry Level.
     *
     * <p>MySQL is not SQL92 compliant
     */

    public boolean jdbcCompliant()
    {
	return false;
    }

    /**
     * Constructs a new DriverURL, splitting the specified URL into its
     * component parts
     * @param url JDBC URL to parse
     * @param defaults Default properties
     * @return Properties with elements added from the url
     * @exception java.sql.SQLException
     */

    //
    // This is a new URL-parser. This file no longer contains any
    // Postgresql code.
    //

    Properties parseURL(String Url, Properties Defaults) throws java.sql.SQLException
    {
	Properties URLProps = new Properties(Defaults);
    
 
    
	/*
	 * Parse parameters after the ? in the URL and remove
	 * them from the original URL.
	 */
     
	int index = Url.indexOf("?");
    
	if (index != -1) {
	    String ParamString = Url.substring(index + 1, Url.length());
	    Url = Url.substring(0, index);
        
	    StringTokenizer QueryParams = new StringTokenizer(ParamString, "&");
        
	    while (QueryParams.hasMoreTokens()) {
        
		StringTokenizer VP = new StringTokenizer(QueryParams.nextToken(), "=");
            
		String Param = "";
            
		if (VP.hasMoreTokens()) {
		    Param = VP.nextToken();
		}
            
		String Value = "";
            
		if (VP.hasMoreTokens()) {
		    Value = VP.nextToken();
		}
                       
		if (Value.length() > 0 && Param.length() > 0) {
		    URLProps.put(Param, Value);
		}
	    }
	}
     
	StringTokenizer ST = new StringTokenizer(Url, ":/", true);
    
	if (ST.hasMoreTokens()) {
	    String Protocol = ST.nextToken();
	    if (Protocol != null) {
		if (!Protocol.toLowerCase().equals("jdbc"))
		    return null;
	    }
	    else {
		return null;
	    }
	}
	else {
	    return null;
	}

	// Look for the colon following 'jdbc'

	if (ST.hasMoreTokens()) {
	    String Colon = ST.nextToken();
	    if (Colon != null) {
		if (!Colon.equals(":"))
		    return null;
	    }
	    else {
		return null;
	    }
	}
	else {
	    return null;
	}

	// Look for sub-protocol to be mysql

	if (ST.hasMoreTokens()) {
	    String SubProto = ST.nextToken();
	    if (SubProto != null) {
		if (!SubProto.toLowerCase().equals("mysql"))
		    return null; // We only handle mysql sub-protocol
	    } 
	    else {
		return null;
	    }
	}
	else {
	    return null;
	}

	// Look for the colon following 'mysql'

	if (ST.hasMoreTokens()) {
	    String Colon = ST.nextToken();
	    if (Colon != null) {
		if (!Colon.equals(":"))
		    return null;
	    }
	    else {
		return null;
	    }
	}
	else {
	    return null;
	}

	// Look for the "//" of the URL

	if (ST.hasMoreTokens()) {
	    String Slash = ST.nextToken();
	    String Slash2 = "";
	    if (ST.hasMoreTokens()) {
		Slash2 = ST.nextToken();
	    }
	    if (Slash != null && Slash2 != null) {
		if (!Slash.equals("/") && !Slash2.equals("/"))
		    return null;
	    }
	    else {
		return null;
	    }
      
	}
	else {
	    return null;
	}

	// Okay the next one is a candidate for many things
	if (ST.hasMoreTokens()) {
	    String Token = ST.nextToken();
	    if (Token != null) {
		if (!Token.equals(":") && !Token.equals("/")) {
		    // Must be hostname
		    URLProps.put("HOST", Token);
		    if (ST.hasMoreTokens()) {
			Token = ST.nextToken();
		    }
		    else {
			return null;
		    }
		}
		// Check for Port spec
		if (Token.equals(":")) {
		    if (ST.hasMoreTokens()) {
			Token = ST.nextToken();
			URLProps.put("PORT", Token);
                        if (ST.hasMoreTokens()) {
			    Token = ST.nextToken();
			}
		    }
		}
		if (Token.equals("/")) {
		    if (ST.hasMoreTokens()) {
			Token = ST.nextToken();
			URLProps.put("DBNAME", Token);
          
			// We're done
			return URLProps;
		    }
		    else {
			return null;
		    }
		} 
	    }
	    else {
		return null;
	    }
	}
	else {
	    return null;
	}
    
	return URLProps;
    }
                  
    //
    // return the hostname property
    //

    public String host()
    {
	return _Props.getProperty("HOST","localhost");
    }

    //
    // return the port number property
    //

    public int port()
    {
	return Integer.parseInt(_Props.getProperty("PORT","3306"));
    }

    //
    // return the database name property
    //

    public String database()
    {
	return _Props.getProperty("DBNAME");
    }

    //
    // return the value of any property this driver knows about
    //
 
    public String property(String Name)
    {
	return _Props.getProperty(Name);
    }
}



?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
成人性生交大合| 国产乱一区二区| 欧美日韩午夜在线视频| 亚洲裸体在线观看| 欧美日韩国产欧美日美国产精品| 日韩不卡免费视频| 亚洲视频一区在线观看| 99视频有精品| 亚洲精品一区在线观看| 国产成人自拍在线| 亚洲曰韩产成在线| 日韩欧美一级片| 欧美一区二区精品| 色999日韩国产欧美一区二区| 激情都市一区二区| 精品奇米国产一区二区三区| 亚洲成人动漫在线免费观看| 国产精品超碰97尤物18| 久久久久国产精品麻豆ai换脸 | 日韩一区二区高清| 亚洲成人激情自拍| 26uuu久久综合| 欧美精品日日鲁夜夜添| 91在线精品一区二区| 国产成人午夜电影网| 国产乱一区二区| 国产成人午夜精品影院观看视频 | 91精品办公室少妇高潮对白| 亚洲日本中文字幕区| 亚洲国产高清aⅴ视频| 久久久一区二区三区| 欧美成人精品二区三区99精品| 日韩视频一区在线观看| 91麻豆精品视频| 欧美在线三级电影| 一区二区三区在线免费观看| 国产精品一区二区91| 国产美女视频一区| 国产精品1区二区.| 成人av网站在线| 99v久久综合狠狠综合久久| 不卡电影免费在线播放一区| 91精品国产91久久久久久最新毛片 | 亚洲欧美日韩国产手机在线 | 亚洲午夜久久久久久久久电影网 | 精品一区二区三区在线观看国产| 国产一区在线观看视频| 91国产免费观看| 欧美放荡的少妇| 亚洲国产欧美在线人成| 亚洲成人资源网| 国产不卡视频在线播放| 在线观看精品一区| 欧美mv和日韩mv的网站| 久久这里只有精品视频网| 国产精品久久久久久久久搜平片 | 国产欧美综合色| 国产福利不卡视频| 欧美精彩视频一区二区三区| 狠狠网亚洲精品| 久久久精品免费观看| 国产精品2024| 亚洲电影一级黄| 日韩午夜在线影院| 激情国产一区二区| 国模一区二区三区白浆| 久久爱另类一区二区小说| 精品三级av在线| www.欧美精品一二区| 亚洲va韩国va欧美va精品| 精品久久一二三区| 99精品视频一区二区| 亚洲高清免费观看 | 亚洲国产成人在线| 91免费视频观看| 免费看欧美女人艹b| 国产精品初高中害羞小美女文| 欧美日韩国产免费| 国产成人精品aa毛片| 蓝色福利精品导航| 欧美极品美女视频| 欧美日韩亚洲丝袜制服| 国产盗摄女厕一区二区三区| 日韩国产在线一| 91老司机福利 在线| 亚洲三级小视频| 欧美疯狂做受xxxx富婆| 日韩精品一二区| 久久久久久久久一| 成人免费黄色在线| 中文字幕中文字幕一区二区 | 337p粉嫩大胆噜噜噜噜噜91av| 香蕉成人伊视频在线观看| 亚洲欧美日韩在线| 一区二区三区在线不卡| 亚洲综合免费观看高清完整版在线 | 日韩美女一区二区三区四区| www一区二区| 国产精品欧美精品| 亚洲电影你懂得| 免费成人在线影院| 亚洲三级在线免费观看| 国产三级精品三级| 欧美一卡二卡在线观看| 91在线你懂得| 成人免费毛片app| 美女在线视频一区| 蜜桃精品视频在线| 亚洲综合精品久久| 亚洲欧美激情视频在线观看一区二区三区| 欧美日韩视频在线第一区| 国产成人精品www牛牛影视| 男女视频一区二区| 免费在线欧美视频| 婷婷中文字幕综合| 香蕉久久一区二区不卡无毒影院| 亚洲欧洲综合另类在线| 自拍视频在线观看一区二区| 精品国产自在久精品国产| 日韩一二三区视频| 欧美v日韩v国产v| 久久精品一区二区三区不卡牛牛| 日韩情涩欧美日韩视频| 日韩精品综合一本久道在线视频| 91精品国产麻豆国产自产在线 | 欧美无乱码久久久免费午夜一区 | 成人国产亚洲欧美成人综合网| 极品少妇xxxx偷拍精品少妇| 琪琪久久久久日韩精品| 成人午夜大片免费观看| 欧美精品色综合| 中文字幕精品—区二区四季| 视频一区在线播放| eeuss鲁片一区二区三区在线看| 555www色欧美视频| 1000部国产精品成人观看| 国产在线精品一区二区| 在线观看国产一区二区| 亚洲男女一区二区三区| 国产一二三精品| 日韩精品一区二区三区在线播放| 一片黄亚洲嫩模| 91年精品国产| 亚洲欧美区自拍先锋| 91免费观看在线| ...xxx性欧美| 91丨porny丨首页| 亚洲视频一二三| 91蜜桃婷婷狠狠久久综合9色| 精品久久久久久无| 国产一区二区三区视频在线播放| 日韩午夜激情免费电影| 久久er99热精品一区二区| 精品美女一区二区| 成人免费观看男女羞羞视频| 国产亚洲一二三区| 91美女蜜桃在线| 五月激情综合色| 久久综合一区二区| av资源站一区| 天天综合日日夜夜精品| 久久无码av三级| 欧美人伦禁忌dvd放荡欲情| 日韩激情一区二区| 国产精品伦一区| 欧美肥大bbwbbw高潮| 99re这里都是精品| 免费成人在线影院| 国产日韩欧美综合在线| 国产精品18久久久久久久久| 亚洲丝袜美腿综合| 欧美大片国产精品| 欧美系列在线观看| 成人黄色av网站在线| 日本不卡高清视频| 26uuu精品一区二区三区四区在线| 欧美日韩国产美女| 国产一区999| 粉嫩av一区二区三区粉嫩| 国产精品一级二级三级| 极品少妇一区二区三区精品视频| 美女视频黄 久久| 麻豆国产精品777777在线| 捆绑调教一区二区三区| 国产一区二区免费视频| 国产精品白丝jk黑袜喷水| 国产98色在线|日韩| 99久久综合国产精品| 91视视频在线直接观看在线看网页在线看 | 69久久夜色精品国产69蝌蚪网| 欧美亚洲动漫另类| 这里是久久伊人| 久久久久久久综合日本| 国产精品色在线观看| 一区二区成人在线观看| 亚洲欧美激情在线| 国产精品女同一区二区三区| 91成人免费在线| 97久久超碰国产精品电影| 久久99精品一区二区三区|