随笔 - 326,  文章 - 0,  评论 - 0,  阅读 - 16万

随笔分类 -  Java常用API

Java获取当前时间并转换成字符串
摘要:Date date = new Date();//获取当前的日期 SimpleDateFormat df = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");//设置日期格式 String str = df.format(date);//获取String类型的 阅读全文
posted @ 2020-09-18 01:17 文种玉 编辑
利用反射获取类的信息
摘要:1.创建一个实体类 2.创建一个测试反射的类 方法 /** className参数为全类名(类名+包名) **/ public void test(String className) throw Exception{ //获取类对象 Class cls = Class.forName(classNa 阅读全文
posted @ 2020-08-08 11:42 文种玉 编辑
百度AI人工智能人脸识别错误提示
摘要:错误编码:"error_code": 14 出错原因是:APP_ID,API_KEY,SECRET_KEY,字符串多写或者少些或者出现了空格 错误编码:"error_code": 222203, 不识别你的图片,应该是你的图片不是Base64转码之后的字符串 阅读全文
posted @ 2020-05-28 01:11 文种玉 编辑
百度云AI中将字符串转换成byte数组问题
摘要://将字符串转换成byte数组 public static byte[] fileToBytes(String filePath) { byte[] buffer = null; File file = new File(filePath); FileInputStream fis = null; 阅读全文
posted @ 2020-05-26 11:13 文种玉 编辑
Java 加解密技术系列之 HMAC
摘要:本文转载  https://blog.csdn.net/happylee6688/article/details/43968549 阅读全文
posted @ 2018-04-02 17:10 文种玉 编辑
java实现邮箱发送(java mail)
摘要:导包:mail.jar import java.util.Properties; import javax.mail.Message; import javax.mail.Message.RecipientType; import javax.mail.MessagingException; imp 阅读全文
posted @ 2018-03-14 15:26 文种玉 编辑
java关于字符串和日期的代码展示
摘要:StringBuffer是线性安全的,StringBuilder不是线性安全的 字符串的修改: stringBudile与stringBuiler提供了用于修改字符串内容的相关方法 String str=”努力学习JAVA”; StringBudile sb=new StringBuile(); a 阅读全文
posted @ 2018-03-14 15:22 文种玉 编辑

< 2025年3月 >
23 24 25 26 27 28 1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30 31 1 2 3 4 5

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