• 大小: 10.7MB
    文件类型: .rar
    金币: 1
    下载: 0 次
    发布日期: 2023-10-14
  • 语言: Java
  • 标签:

资源简介

清华大学出版社java网络编程经典书籍光盘源码

资源截图

代码片段和文件信息

package net.db;

import java.sql.*;

public class DBManager {
public static Connection openConnection(String strDBType String strUrl
String strUserName String strPassword) {
Connection con = null;
try {
if (“sqlserver“.equalsIgnoreCase(strDBType)) {
// 装载sqlserver驱动
Class.forName(“com.microsoft.sqlserver.jdbc.SQLServerDriver“);
} else if (“oracle“.equalsIgnoreCase(strDBType)) {
// 装载oracle驱动
Class.forName(“oracle.jdbc.driver.OracleDriver“);
} else if (“mysql“.equalsIgnoreCase(strDBType)) {
// 装载oracle驱动
Class.forName(“org.gjt.mm.mysql.Driver“);
}
// 获得连接
con = DriverManager.getConnection(strUrl strUserName strPassword);
} catch (Exception e) {
e.printStackTrace();
}
return con;
}

public static void closeConnection(Connection con) {
if (con != null) { // 连接非空
try {
if (!con.isClosed()) {// 连接处于打开状态
con.close();
}
} catch (Exception e) {
e.printStackTrace();
}
}
}
}

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----

     文件        226  2008-01-19 11:16  chap03\UDPSocket\.classpath

     文件        385  2008-01-19 11:16  chap03\UDPSocket\.project

     文件       2346  2008-01-19 11:16  chap03\UDPSocket\thread\udp\ClientBean.class

     文件       2434  2008-01-19 11:16  chap03\UDPSocket\thread\udp\ClientBean.java

     文件       2602  2008-01-19 11:16  chap03\UDPSocket\thread\udp\ServerBean.class

     文件       2498  2008-01-19 11:16  chap03\UDPSocket\thread\udp\ServerBean.java

     文件       1576  2008-01-19 11:16  chap03\UDPSocket\thread\udp\UDPClient.class

     文件       1061  2008-01-19 11:16  chap03\UDPSocket\thread\udp\UDPClient.java

     文件        732  2008-01-19 11:16  chap03\UDPSocket\thread\udp\UDPServer.class

     文件        304  2008-01-19 11:16  chap03\UDPSocket\thread\udp\UDPServer.java

     文件        967  2008-01-19 11:16  chap03\UDPSocket\udp\DataGramHelper.class

     文件        460  2008-01-19 11:16  chap03\UDPSocket\udp\DataGramHelper.java

     文件       1805  2008-01-19 11:16  chap03\UDPSocket\udp\UDPClient.class

     文件       1313  2008-01-19 11:16  chap03\UDPSocket\udp\UDPClient.java

     文件       2211  2008-01-19 11:16  chap03\UDPSocket\udp\UDPServer.class

     文件       1322  2008-01-19 11:16  chap03\UDPSocket\udp\UDPServer.java

     文件        295  2008-01-19 11:16  chap03\UDPSocket_readme.txt

     文件        726  2008-01-19 11:16  chap04\applet\.classpath

     文件        382  2008-01-19 11:16  chap04\applet\.project

     文件         15  2008-01-19 11:16  chap04\applet\au.properties

     文件       4041  2008-01-19 11:16  chap04\applet\Audiapplet.class

     文件       3899  2008-01-19 11:16  chap04\applet\Audiapplet.java

     文件         17  2008-01-19 11:16  chap04\applet\com\study\applet\Audiapplet\au.properties

     文件       4220  2008-01-19 11:16  chap04\applet\com\study\applet\Audiapplet\Audiapplet.class

     文件       3990  2008-01-19 11:16  chap04\applet\com\study\applet\Audiapplet\Audiapplet.java

     文件     238431  2008-01-19 11:16  chap04\applet\com\study\applet\Audiapplet\fresh.au

     文件        141  2008-01-19 11:16  chap04\applet\com\study\applet\Audiapplet\java.policy.applet

     文件        750  2008-01-19 11:16  chap04\applet\com\study\applet\Audiapplet\StartPageForAudiapplet.html

     文件         17  2008-01-19 11:16  chap04\applet\com\study\applet\Imgapplet\image.properties

     文件       2330  2008-01-19 11:16  chap04\applet\com\study\applet\Imgapplet\Imgapplet.class

............此处省略603个文件信息

评论

共有 条评论