更新时间:2023-01-12 13:17:11
阅读逐字节是另一种极端的解决方案,并且效率非常低。您应该只使用BufferedInputStream,并按块读取字节块。
Reading byte by byte is the other extreme solution, and will be very inefficient. You should simply use a BufferedInputStream, and read the bytes chunk by chunk.
阅读关于字节流的Java IO教程。
使用Java 7 API逐字节读取文件
Java:如何使用大于0x7F的字节文字
如何使用 aws-java-sdk 从 S3 逐块读取文件
使用java.util.Scanner逐字节读取文件