摘要: ```go package test import ( "fmt" "io/ioutil" "log" "net/http" "net/url" "testing" ) var proxyConf = "112.195.81.161:8118" func buildHtppClient(isProxy bool) *http.Client { var proxy func(*http.Reques 阅读全文
posted @ 2019-08-23 16:33 加州水果 阅读(2815) 评论(0) 推荐(0) 编辑
摘要: 也可采用 ioutil 简洁读写文件 go import ( "fmt" "io" "os" ) func read() { var filePath string = "C:\\Users\\Desktop\\temp.txt" fp, err := os.Open(filePath) if er 阅读全文
posted @ 2019-08-23 15:29 加州水果 阅读(3170) 评论(0) 推荐(0) 编辑
摘要: ```java @Test public void test() { String filePath = "C:\\Users\\xxxxx8\\Desktop\\temp.txt"; byte[] buff = new byte[1024]; // 一次取出的字节大小 int i = 0; try (FileInputStream fis = new FileInputStream(filePa 阅读全文
posted @ 2019-08-23 10:56 加州水果 阅读(1959) 评论(0) 推荐(0) 编辑