32. CsvUtil.getReader().read(FileUtil.getReader("data.csv"))
Read CSV into a list of rows. Automatic handling of quotes and escapes.
33. CsvUtil.getWriter("output.csv").write(headerRow, dataRows)
Write CSV data.
34. ExcelUtil.getReader("file.xlsx").readAll()
Read Excel files (both .xls and .xlsx) without Apache POI’s complexity.
35. ExcelWriter writer = ExcelUtil.getWriter("output.xlsx"); writer.write(data); writer.close()
Write Java collections to Excel.
// No more MessageDigest boilerplate
String md5 = SecureUtil.md5("password");
String sha256 = SecureUtil.sha256("data");
String randomKey = SecureUtil.randomString(16);
If you’ve written Java for more than a week, you know the pain.
You need to copy a file? 15 lines of try-catch-finally.
You need to check if a string is empty? Two null checks and a trim.
You need to call a REST API? HttpURLConnection boilerplate that makes your eyes bleed.
Enter Hutool.
While many Java developers reach for Guava or Apache Commons, Hutool (version 3.9 in particular) strikes a brilliant balance: Chinese simplicity with global utility.
Version note: Hutool 3.9.x is mature, stable, and still used in thousands of production systems. It lacks some 4.x/5.x features, but it’s lighter and less prone to breaking changes.
"Hutool 39" is your cheat sheet for pragmatic Java. It’s not about memorizing APIs—it’s about recognizing that FileUtil, StrUtil, and HttpUtil should have been in the JDK from the start.
The next time you write a for loop to join strings, or a try-catch to parse a date, stop yourself. Ask: “Which of the 39 methods does this?”
Your future self—and your teammates—will thank you. hutool 39
Have you used Hutool in production? Which of the 39 methods saved you the most hours? Share in the comments below.
Keywords integrated: hutool 39, Java utilities, file handling, HTTP client, string manipulation, date parsing, encryption, CSV, Excel, reflection.
From sending HTTP requests to generating MD5 hashes, these modules handle infrastructure-level tasks.
Now, let’s explore the 39 methods you’ll actually use every week.
15. HttpUtil.get("https://api.example.com/data")
GET request returning the body as a string. Handles SSL, redirection, and timeouts automatically. If you’ve written Java for more than a
16. HttpUtil.post(url, bodyMap)
Sends form-urlencoded POST data.
17. HttpUtil.downloadFile(url, destinationFile)
Streams a file from a URL to disk with progress tracking (if needed).
18. HttpUtil.createServer().addAction("/hello", (req, res) -> res.write("Hi")).start()
Yes—Hutool contains a lightweight embedded HTTP server for prototyping.
Hutool version 3.9 represents a mature, stable iteration of the popular Java utility library. Situated before the major architectural shifts of the 4.x and 5.x lines, version 3.9 is prized by developers for its reliability in production environments while still introducing meaningful enhancements to reduce Java boilerplate code.
| Feature | Description |
|---------|-------------|
| CollUtil.isEmpty() | Now supports null safely |
| DateUtil.range() | Generate date ranges (daily, monthly) |
| SecureUtil.hmacSha1() | HMAC-SHA1 support |
| CsvUtil | Read/write CSV files |
| ImgUtil.pressText() | Image watermarking |
| ZipUtil.zip() | Recursive directory zip | Version note : Hutool 3