随笔分类 -  java工具

摘要:1 package com.gta.yyyf.commons.utils; 2 3 import java.io.UnsupportedEncodingException; 4 import java.net.URLDecoder; 5 import java.util.Enumeration; 6 import java.util.HashMap; 7 impor... 阅读全文
posted @ 2018-01-09 15:05 付恒 阅读(2487) 评论(0) 推荐(0)
摘要:package com.gta.yyyf.commons.utils; import java.io.IOException; import javax.servlet.http.HttpServletResponse; import org.slf4j.Logger; import org.slf4j.LoggerFactory; /** * HttpServletResponse帮... 阅读全文
posted @ 2018-01-09 15:04 付恒 阅读(1157) 评论(0) 推荐(0)
摘要:转载至:http://blog.csdn.net/carolzhang8406/article/details/6760430 windows由于没有默认的ssh server,因此在允许ssh之前需要先安装ssh server。 下载freeSSHd http://www.freesshd.com 阅读全文
posted @ 2017-12-15 16:16 付恒 阅读(6308) 评论(0) 推荐(0)
摘要:1 public class ConfigurationUtils { 2 private static Map config; 3 private static Map sourceConfig; 4 5 private static volatile boolean inited = false; 6 7 public sync... 阅读全文
posted @ 2017-12-15 13:30 付恒 阅读(374) 评论(0) 推荐(0)
摘要:1 public class ComputerUtils { 2 /** 3 * @function 获取主本机ip 4 * @author heng.fu 5 * @date 2017年7月19日 下午2:22:03 6 * @param @return 7 * @return String 8 */ 9 ... 阅读全文
posted @ 2017-12-14 16:00 付恒 阅读(1078) 评论(0) 推荐(0)
摘要:1 public class ImageFixSizeUtil { 2 3 /** * 图片文件读取 * * @param srcImgPath * @return */ 4 private static BufferedImage InputImage(String srcImgPath) { 5 BufferedImage srcImag... 阅读全文
posted @ 2017-12-14 15:56 付恒 阅读(1538) 评论(0) 推荐(0)
摘要:1 public class ExcelToImage { 2 3 /** 4 * 临时文件夹 5 */ 6 private static String UPLOAD_DIR = "upload" + File.separator; 7 /** 8 * 获取上传的文件 9 * @param up... 阅读全文
posted @ 2017-12-14 15:56 付恒 阅读(1297) 评论(0) 推荐(0)
摘要:1 public class PdfToImage { 2 3 private static String UPLOAD_DIR = "upload" + File.separator; 4 5 /** 6 * 获取上传的文件 7 * @param uploadPath 8 * @param file ... 阅读全文
posted @ 2017-12-14 15:55 付恒 阅读(403) 评论(0) 推荐(0)
摘要:public class SshConnTool { private Connection conn; private String ipAddr; private String charset = Charset.defaultCharset().toString(); private String userName; private String password; pub... 阅读全文
posted @ 2017-12-14 15:52 付恒 阅读(652) 评论(0) 推荐(0)
摘要:private Boolean isOutside(HttpServletRequest request) { Boolean result = false; // 获取客户端IP地址,考虑反向代理的问题 String ip = request.getHeader("x-forwarded-for"); if (StringUtil... 阅读全文
posted @ 2017-12-14 15:49 付恒 阅读(3912) 评论(0) 推荐(0)