//读取文件转换成字符串Strings=FileUtils.readFileToString(newFile("D:\\d\\write.txt"),"UTF-8");//读取文件转换成字节数组byte[]datas=FileUtils.readFileToByteArray(newFile("D:\\d\\write.txt"));//逐行读取,返回类型是ListList<String&g
分类:
编程语言 时间:
2019-08-03 21:50:56
阅读次数:
263
因业务需求,php项目对接一个java的api用到了SHA-256签名和延签,和java同学一起研究了下php和java的SHA-256签名和延签,分享下操作:publicclassSignUtils{publicstaticStringtoSign(Stringdata,Stringsalt){Strings=data+salt;byte[]sign;try{sign=SHA256.Digest
分类:
编程语言 时间:
2019-08-03 16:19:02
阅读次数:
93
Sherlock Holmes received a note with some strange strings: Let's date! 3485djDkxh4hhGE 2984akDfkkkkggEdsb s&hgsfdk d&Hyscvnm. It took him only a minut ...
分类:
其他好文 时间:
2019-08-03 14:22:55
阅读次数:
71
在 Java 中不使用多余变量交换两个字符串 Strings before swap: a = Hello and b = World Strings after swap: a = World and b = Hello ...
分类:
编程语言 时间:
2019-08-03 01:04:02
阅读次数:
120
Redis学习指南 一、数据结构 string(字符串) list(列表) set(集合) hash(散列) zset(有序集合) string(字符串) list(列表) set(集合) hash(散列) zset(有序集合) 二、命令列表 2.1 Redis Strings 2.2 Redis ...
分类:
其他好文 时间:
2019-08-02 14:40:57
阅读次数:
141
43. Multiply Strings 1 题目 Given two non negative integers and represented as strings, return the product of and , also represented as a string. Exampl ...
分类:
其他好文 时间:
2019-08-02 09:21:03
阅读次数:
85
49. Group Anagrams Medium 1824116FavoriteShare 49. Group Anagrams Medium 1824116FavoriteShare Medium Given an array of strings, group anagrams togethe ...
分类:
其他好文 时间:
2019-07-26 19:48:57
阅读次数:
102
E. Remembering Strings 题目大意: You have multiset of n strings of the same length, consisting of lowercase English letters. We will say that those string ...
分类:
其他好文 时间:
2019-07-24 20:50:41
阅读次数:
76
Strings="ada";char[]a=s.toCharArray();将字符串转换成字符数组publicclasstest{publicstaticvoidmain(String[]args){Filef=newFile("D:d/write.txt");Writerwriter=null;try{writer=newFileWriter(f);//写法一/*String
分类:
编程语言 时间:
2019-07-24 16:35:29
阅读次数:
122
byte[]flush=newbyte[n]//字节数组充当缓冲容器.read(flush)//每次返回读取的n个字节,当数据字节数不够时,返回实际字节数intlen=-1;//接受read(flush)返回的实际长度Strings=newString(flush,0,len)//解码操作,len必须为实际大小,否则多余长度会返回垃圾字符publicstaticvoidmain(String[]a
分类:
编程语言 时间:
2019-07-24 15:03:28
阅读次数:
92