随笔分类 -  JAVA

摘要:后台代码 阅读全文
posted @ 2017-03-28 15:55 1582277142 阅读(132) 评论(0) 推荐(0)
摘要:package test.com; import ch.ethz.ssh2.Connection; import ch.ethz.ssh2.SCPClient; /** * SCP 上传下载 用包 ganymed-ssh2-build210.jar */ public class SCPFile { static Connection con = null; publ... 阅读全文
posted @ 2017-03-09 11:15 1582277142 阅读(403) 评论(0) 推荐(0)
摘要:package httpClient; import java.util.ArrayList; import java.util.List; import org.apache.http.HttpResponse; import org.apache.http.NameValuePair; import org.apache.http.client.HttpClient; import or... 阅读全文
posted @ 2017-03-07 10:52 1582277142 阅读(305) 评论(0) 推荐(0)
摘要:package httpclient; import java.io.BufferedReader; import java.io.InputStream; import java.io.InputStreamReader; import java.util.ArrayList; import java.util.List; import org.apache.commons.httpcli... 阅读全文
posted @ 2017-03-01 11:00 1582277142 阅读(218) 评论(0) 推荐(0)
摘要:/** * 是否包含中文 **/ public static boolean isContainsChinese(String str) { String regEx = "[\u4e00-\u9fa5]"; Pattern pat = Pattern.compile(regEx); Matcher 阅读全文
posted @ 2017-01-20 18:09 1582277142 阅读(406) 评论(0) 推荐(0)
摘要:package mytiny.com.common; import java.awt.Color;import java.awt.Graphics2D;import java.awt.Image;import java.awt.image.BufferedImage;import java.io.F 阅读全文
posted @ 2016-12-16 15:24 1582277142 阅读(12284) 评论(0) 推荐(0)
摘要:try { InputStream in = new FileInputStream(new File(oldPath)); OutputStream out = new FileOutputStream(new File(newPath )); byte[] be = new byte[100]; 阅读全文
posted @ 2016-12-15 16:28 1582277142 阅读(148) 评论(0) 推荐(0)
摘要:<?xml version="1.0" encoding="UTF-8"?> <parameters> <parameter key="HolderName">测试</parameter> <parameter key="save-holder">1</parameter> <parameter k 阅读全文
posted @ 2016-12-15 13:25 1582277142 阅读(9831) 评论(0) 推荐(0)
摘要:// 创建多级文件夹 public static void createDirectory(String path) throws Exception { if (StringUtils.isNullOrEmpty(path)) { return; } try { // 获得文件对象 File f 阅读全文
posted @ 2016-12-02 19:06 1582277142 阅读(301) 评论(0) 推荐(0)
摘要:// int tp = 1 返回执行结果 非1 返回命令执行后的输出 public static String runCommand(String cmd, int tp) { StringBuffer buf = new StringBuffer(1000); String rt = "-1"; 阅读全文
posted @ 2016-12-02 19:01 1582277142 阅读(1071) 评论(0) 推荐(0)
摘要:// main方法 public static void main(String[] args) { timerEnter(); } // 设定指定任务task在指定延迟delay后进行固定延迟peroid的执行 // schedule(TimerTask task启动任务, long delay第 阅读全文
posted @ 2016-11-01 17:44 1582277142 阅读(145) 评论(0) 推荐(0)
摘要:package com.common; import java.io.UnsupportedEncodingException;import java.math.BigDecimal;import java.util.HashMap;import java.util.Iterator;import 阅读全文
posted @ 2016-11-01 17:44 1582277142 阅读(2073) 评论(0) 推荐(0)
摘要:public class CommonFunc { /** * 取properties文件中的键值对 */ public static String getProperties(String param) throws Exception { Properties prop = new Proper 阅读全文
posted @ 2016-11-01 17:38 1582277142 阅读(1278) 评论(0) 推荐(0)