随笔分类 - java
摘要:public class Test{ /*FileReader/FileWriter读写乱码,待处理*/ public static void main(String[] args) throws IOException{ FileReader fileReader = null; FileWrit
        阅读全文
                
摘要:public class Test{ public static void main(String[] args) throws IOException{ FileInputStream in = null; BufferedInputStream bis =null; FileOutputStre
        阅读全文
                
摘要:JSON操作借用JSON-lib包,JSON-lib包同时依赖于以下的JAR包: json-lib-2.4-jdk15.jar commons-logging.jar commons-beanutils.jar commons-collections.jar ezmorph.jar /** *jso
        阅读全文
                
摘要:/** * 排序控制* @author Mr.chen 2016-6-1 */ public class OrderItem { //列名(对应实体的属性命名规范)	String columnName; //排序方式	OrderOption option = OrderOption.DESC; pu
        阅读全文
                
摘要:一、单点登陆分两种 1.1子域单点登陆/二级域单点登陆 例如:site1.domain.com和site2.domain.com相同域之间单点登陆 子域单点登陆实现比较简单。利用cookie就行 1.2完全跨域单点登陆 例如:www.baidu.com和www.jd.com不同域之间单点登陆。 跨域
        阅读全文
                
摘要:<% HttpSession s = request.getSession(); s.setAttribute("name","test"); %> Session属性值:<%=s.getAttribute("name") %> SessionID:<%=s.getId()%>
        阅读全文
                
摘要:功能上传 需求:同时上传多张图片 前端:jquery.ajaxfileupload.js 后端:jfinal upload.htm <html> <body> <div class="form-element-file-wapper"> <button type="button">上传照片</but
        阅读全文
                
摘要:package com.it.simple.util; import java.io.BufferedOutputStream;import java.io.ByteArrayOutputStream;import java.io.File;import java.io.FileInputStrea
        阅读全文
                
摘要:/** * 把PDF所有页转换为JPG, 并返回所有图片的路劲集合 * @param inputFilePath * 图片路径,具体到文件名 * @param outputFilePath * 输出目录, 不需要文件名 * @return * @throws IOException */	publi
        阅读全文
                
摘要:实例一 public class SimpleThread extends Thread{ public SimpleThread(){ //构造函数可以初始化一些参数	} @Override public void run() { System.out.println("thread start.
        阅读全文
                
摘要:需要工具: 1、openoffice 将word、excel、ppt、txt等文件转换为pdf文件 2、SWFTool 将pdf转换为swf文件 3、flexPaper是一个开源轻量级的在浏览器上显示各种文档的组件
        阅读全文
                
摘要:实例一: public enum OrderOption {ASC,DESC; } 实例二(带参数构造函数): public enum OrderOption { ASC("ASC"), DESC("DESC"); String type; OrderOption(String type){ thi
        阅读全文
                
摘要:public class Simple { @Test	public void test1(){ System.out.println("111");	} @Test	public void test2(){ System.out.println("222");	} @Test	public voi
        阅读全文
                
摘要:public class Test { public static void main(String[] args) throws IOException { InputStream in = Test.class.getClassLoader().getResourceAsStream("DB.p
        阅读全文
                
摘要:public static void main(String[] args) throws NoSuchAlgorithmException { String systemcode = "xxx"; //密钥 String password = "enasddsa"+systemcode; Mess
        阅读全文
                
摘要://递归找出文件夹里面所有文件	public static void main(String[] args) { File f=new File("c://123"); findFile(f);	} public static void findFile(File f){ File[] str=f.
        阅读全文
                
摘要:java FileReader/FileWriter读写字母和数字没问题,但读写汉字就乱码。记录下,后面找到解决方法再补上。 public static void main(String[] args) { FileReader fr = null; FileWriter fw = null; tr
        阅读全文
                
摘要://读取文件->写出文件 public static void main(String[] args) { InputStream in =null; OutputStream out = null; try{ File file = new File("c:\\123.doc"); in = ne
        阅读全文
                
 
                    
                     
                    
                 
                    
                
 
         浙公网安备 33010602011771号
浙公网安备 33010602011771号