Org.apache.commons.io is a functional module for the Common project under Apache Jakarta, providing a high-level file operation method, very easy to use. A record of my learning process, enumerating a few function points I think so. In fact, the function is mainly concentrated in a class of fileutil, including establishment, deleting, copying, moving, comparing new, recursive enumeration directory empty directory, reading the entire file at a time. The following is a list I think useful: 1. BytecountTodisplaysize (long size) Converts the file size indicated by the byte to a string. For example, a 64 × 1024 × 1024 byte file, the result of the conversion is 64 MB. 2. Copyfile (File Source, File DEST) Copy the file. Of course, you can use a while loop to make it, but first open two files, then build a while loop, then turn off two files, it is a bit trouble, with ready-made test code, more people. 3. DELETEDIRECTORY (FILE DIR) Deletes a directory, if there is a subdirectory, perform recursive deletion operations. 4. ForceDeleteoneXIT (File File) When the JVM exits, delete the file or directory corresponding to the File variable. It is very easy to deal with the temporary directory. 5. IsFileNewer (File File, File Reference) Compares whether the first file is more new than the second file. 6. Listfiles (File Dir, IOFILTER FILEFILTER, IOFILEFILTER Dirfilter) Listfiles (File Dir, String [] Extensions, Boolean Recursive, can recurrent all files and directories in the enumeration directory. 7. ReadFileTString (File File, String Encoding) Very practical features, read text files in one time to a string, and you can specify encoding. (Unfortunately, it is lacking a more good readlines in Python. There is also a tool class called endianutil, which can be used to convert the word stream, and it is very thoughtful to have several conversion functions of iPaddress. However, since Java does not have a series variable such as UNSIGNED SHORT, Unsigned Int, these functions are not strong on the switching of the network word stream.