//小人

随笔分类 -  JAVA

摘要:File file = new File("文件路径"); FileInputStream inputStream=null; ByteArrayOutputStream bytOutputStream=null; try { //输入流 inputStream = new FileInputStr 阅读全文
posted @ 2020-06-03 13:27 H_Q 阅读(700) 评论(0) 推荐(0) 编辑
摘要:1.引入token依赖 import { ACCESS_TOKEN } from "@/store/mutation-types" import Vue from 'vue' 2.在data的return中声明headers和token字段 headers: { }, token:{ } 3.在cr 阅读全文
posted @ 2019-09-05 08:50 H_Q 阅读(1983) 评论(0) 推荐(0) 编辑
摘要://前一次执行程序结束后 2000ms 后开始执行下一次程序 java.uitl的包 Timer timer=new Timer(); timer.schedule(new TimerTask() { @Override public void run() { } }, 0,2000); 阅读全文
posted @ 2019-08-31 16:58 H_Q 阅读(120) 评论(0) 推荐(0) 编辑
摘要:1.将Double 或 long 转成BigDecimal : BigDecimal.valueOf(double 或 long) 加法函数:add() 例:a.add(b) 减法函数:subtract() 例:a.subtract(b) 乘法函数:multiply() 例:a.multiply(b 阅读全文
posted @ 2019-08-31 15:53 H_Q 阅读(437) 评论(0) 推荐(0) 编辑
摘要:Collections.sort(ydShips, new Comparator<YdShip>() { @Override public int compare(YdShip o1, YdShip o2) { if(o1.getNumber()> o2.getNumber()){ //number 阅读全文
posted @ 2019-08-31 15:48 H_Q 阅读(215) 评论(0) 推荐(0) 编辑
摘要:1.获得时间 Date date=new Date(); date.toLocaleDateString() //得到年月日 date.toLocaleTimeString()//得到小时 date.toLocaleString()//得到年月日加小时 2.Date转换成String String 阅读全文
posted @ 2019-05-13 20:21 H_Q 阅读(416) 评论(0) 推荐(0) 编辑
摘要:1.file方法: 1.创建文件夹:file.mkdir() 2.创建文件:file.createNewFile() 3.删除文件:file.delete() 4.判断文件是否存在:file.exists() 5.判断是否是文件:file.isFile() 2.用流读取文件一 File file = 阅读全文
posted @ 2019-04-16 19:23 H_Q 阅读(386) 评论(0) 推荐(0) 编辑
摘要:1.把list转成json 1.使用JSONObject(); 导入org.json.JSONArray包 JSONObject jo=new JSONObject(); jo.put("名",值) 2.把JSON转成list JSON.parseObject(userJson, new TypeR 阅读全文
posted @ 2019-04-16 19:17 H_Q 阅读(237) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示