惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

WordPress大学
WordPress大学
T
The Blog of Author Tim Ferriss
V
V2EX
T
Tailwind CSS Blog
N
News | PayPal Newsroom
The Cloudflare Blog
Martin Fowler
Martin Fowler
大猫的无限游戏
大猫的无限游戏
C
Cyber Attacks, Cyber Crime and Cyber Security
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
I
InfoQ
V
Vulnerabilities – Threatpost
Apple Machine Learning Research
Apple Machine Learning Research
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
酷 壳 – CoolShell
酷 壳 – CoolShell
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
T
Threat Research - Cisco Blogs
云风的 BLOG
云风的 BLOG
阮一峰的网络日志
阮一峰的网络日志
T
Threatpost
U
Unit 42
T
The Exploit Database - CXSecurity.com
I
Intezer
爱范儿
爱范儿
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
博客园 - Franky
Spread Privacy
Spread Privacy
A
Arctic Wolf
Microsoft Azure Blog
Microsoft Azure Blog
罗磊的独立博客
cs.CL updates on arXiv.org
cs.CL updates on arXiv.org
H
Hackread – Cybersecurity News, Data Breaches, AI and More
N
News and Events Feed by Topic
Google Online Security Blog
Google Online Security Blog
Hacker News - Newest:
Hacker News - Newest: "LLM"
Recorded Future
Recorded Future
The Register - Security
The Register - Security
Y
Y Combinator Blog
M
MIT News - Artificial intelligence
H
Help Net Security
Schneier on Security
Schneier on Security
P
Proofpoint News Feed
W
WeLiveSecurity
The Last Watchdog
The Last Watchdog
K
Kaspersky official blog
C
Check Point Blog
小众软件
小众软件
A
About on SuperTechFans
博客园 - 【当耐特】
IT之家
IT之家

博客园 - zqzdong

word 宏(图片锐度和对比度) Maven父子结构的项目依赖使用以及打包依赖 在linux下执行不带主函数的jar Maven项目打包 eclipse调用c语言类库 scala rdd的交集 差集 并集 cdh 的 oozie时间校准 java 调用c语言类库 java jar包代码混淆 在windows下查找java服务cup过高问题 AES 加密解密 logger日志配置 hadoop安装 flume配置及其执行命令 kafka配置及其使用 kafkaConsumer(从topic 拿数据存入hdfs) 自定义flume的sink mongodb3.2链接设置 在mongodb中存值,如果存在则修改,不存在插入
java批量导入数据
zqzdong · 2017-02-24 · via 博客园 - zqzdong
StringBuffer sb = new StringBuffe();
sb.append(str[1] + "#XT#");
sb.append(str[2]+"#XT#");
sb.append("\n");
byte date[] = sb.toString().getBytes();
InputStream in = new ByteArrayInputStream(date);
insertBeach(in);
sb = new StringBuffer();

public static void insertBeach(InputStream in){
        try{
                conn = Util.getConnect();
                String sql = "load data local infile 'sql.scv'  ignore table  Base.table fields terminated  by '#XT#' ";
                 ps = conn.prepareStatement (sql);
                  if(ps.isWrapperFor(com.mysql.jdbc.Statement.class)){
                  com.mysql.jdbc.PreparedStatement   pst  = ps.unwrap(com.mysql.jdbc.PreparedStatement.class);
                  pst.setLocalInfileInputStream(in);
                  pst.executeUpdate()
            }
        }catch(Exception e){
            e.printStackTrace();
       }finally{
            closePs(ps);
            closeConn(conn);
    }
}

posted @ 2017-02-24 16:08  zqzdong  阅读(946)  评论()    收藏  举报