java
ccclych1
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
2021版IDEA创建web工程流程
2021版IDEA创建web工程流程原创 2022-09-16 11:07:27 · 245 阅读 · 1 评论 -
HttpServlet推送数据
public static String portalPushMessage(String url,Info info) throws ServletException, IOException { CloseableHttpClient httpClient = HttpClientBuilder.create().build(); HttpPost posturl = new HttpPost(url); String jsonSting = JSON.toJSONStrin.原创 2020-11-27 14:50:30 · 232 阅读 · 0 评论 -
接收文件转存到本地
public class WordChange { public static boolean GenerateImage(String imgStr, String savedImagePath) { // 文件字节数组字符串数据为空 if (imgStr == null) { return false; } BASE64Decoder deco...原创 2019-08-29 10:53:19 · 302 阅读 · 0 评论 -
截取标签中的内容
public class countwords { public static void main(String[] args) { String con=""; List<Integer> list=new ArrayList<>(); List<Integer> list1=new ArrayList<>(); ...原创 2019-08-29 09:12:55 · 469 阅读 · 0 评论 -
c:if 写法
<c:if test="${cart.imgtype =='musicroom'}"> <strong style="font-size: 18px;line-height: 200px">音乐教室</strong> </c:if>原创 2019-05-07 13:21:04 · 1202 阅读 · 0 评论 -
按行读取文件
按行读取文件(不乱码) 1.第一种方式 public class writetest { public static void main(String[] args) { List<String> list=new ArrayList<>(); File filepath = new File("f://write/test.txt"); ...原创 2019-08-19 15:41:42 · 337 阅读 · 0 评论 -
Base64加密解密相关内容
1. 将String类型的字符串进行Base64加密、解密的工具类: package util; import sun.misc.BASE64Decoder; import sun.misc.BASE64Encoder; import java.io.UnsupportedEncodingException; public class BaseUtil { // 加密 pub...原创 2019-08-14 14:48:08 · 947 阅读 · 0 评论 -
File转byte[]
1.将File文件转为byte[] public class FileChange { public static byte[] File2byte(File tradeFile){ byte[] buffer = null; try { FileInputStream fis = new FileInputStream(tradeFile); ...原创 2019-08-14 14:55:37 · 2380 阅读 · 0 评论 -
通过key查找指定文件夹中的文件
1.以下为实现的工具类 package util; import java.io.File; import java.io.FileFilter; import java.util.ArrayList; import java.util.List; public class TextSearchFile { public static List<File> searchFi...原创 2019-08-14 14:58:55 · 311 阅读 · 0 评论 -
List与Array互相转化
List转Array: ArrayList<String> list=new ArrayList<String>(); String[] strings = new String[list.size()]; list.toArray(strings); Array转list: String[] s = {"a","b","c"}; List list = java...原创 2019-08-12 09:51:12 · 279 阅读 · 0 评论 -
json前台传递乱码解决
@ResponseBody @RequestMapping(value="/getComm",produces = "text/plain;charset=utf-8") 当返回值为json类型时,为 produces = "application/json; charset=utf-8" 当返回值为String类型时,为 produces = "text/plain;char...原创 2019-08-21 14:08:21 · 448 阅读 · 0 评论 -
XmlUtil:XML和实体类的相关转化工具
import javax.xml.bind.JAXBContext; import javax.xml.bind.JAXBException; import javax.xml.bind.Marshaller; import javax.xml.bind.Unmarshaller; import java.io.*; public class XMLUtil { /** * 将对象直...原创 2019-08-16 17:01:07 · 1170 阅读 · 0 评论 -
js为img动态赋值
情景:当图片存储在数据库中,上传后立即回显 var url=path+"/user/img?photopath="+photopath; document.getElementById('photo').src=url; js原生方法:document.getElementById("photo").src = "xxxx.jpg"; Jquery方法:$("#photo").attr("s...原创 2019-04-29 19:21:46 · 7952 阅读 · 0 评论
分享