
JavaIO
文章平均质量分 56
雪落南城
这一场人间流浪,长随步履温柔相候
展开
-
Reactor反应器模式
读《Netty、Redis、Zookeeper高并发实战》摘录应用“全宇宙最有名的、最⾼性能”的Web服务器Nginx,就是基于反应器模式的;如雷贯⽿的Redis,作为最⾼性能的缓存服务器之⼀,也是基于反应器模式的;⽬前⽕得“⼀塌糊涂”、在开源项⽬中应⽤极为⼴泛的⾼性能通信中间件Netty,更是基于反应器模式的。什么是reactor反应器模式?引⽤⼀下Doug Lea(那是⼀位让⼈⽆限景仰的⼤师,Java中Concurrent并发包的᯿要作者之⼀)在⽂章《Scalable IO in Java》原创 2021-01-22 17:23:57 · 189 阅读 · 0 评论 -
JavaIO-下载url图片到本地
//url:图片链接 path:下载目标路径private void downloadImage(String url,String path) { InputStream in = null; URLConnection urlConnection = null; OutputStream os = null; try { URL httpU...原创 2019-08-20 19:43:30 · 468 阅读 · 0 评论 -
Java压缩文件
package com.gongfuhaoche.oms.common.utils;import java.io.*;import java.util.zip.CRC32;import java.util.zip.CheckedOutputStream;import java.util.zip.ZipEntry;import java.util.zip.ZipOutputStream...原创 2019-08-20 19:44:02 · 230 阅读 · 0 评论 -
Java读取TXT文件
public static void main(String[] args) { BufferedReader bf = null; try { bf = new BufferedReader(new InputStreamReader(new FileInputStream(new File("/Users/wecash/Desktop/companylist....原创 2019-08-23 10:33:54 · 143 阅读 · 0 评论