Hutool 39 Now
ImgUtil.scale(FileUtil.file("origin.jpg"), FileUtil.file("thumb.jpg"), 0.5f);
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. hutool 39
Streams a file from a URL to disk with progress tracking (if needed). ImgUtil
Null-safe conversion. No more object == null ? "" : object.toString() . dtos = CollUtil.newArrayList()
Hutool is built on the philosophy of making Java "sweet" and functional-style, focusing on three main goals:
// #30: Bean copy to DTO List<UserDTO> dtos = CollUtil.newArrayList(); for (User u : users) UserDTO dto = new UserDTO(); BeanUtil.copyProperties(u, dto); dtos.add(dto);