Tag Archives: NIO

Reading text file line by line in Java

Reading text files from hard disk is quite common task in software development practice. Usually we are interested in processing it line by line. In this article I would like to present few popular ways how to do it easily … Continue reading

Posted in Java | Tagged , | Leave a comment

Recursively walking directory using Java NIO

Sometimes you may need to recursively visit all files and subdirectories of given directory and perform some actions on it. The typical use case is searching files of a given type, copying or removing a directory including all its contents. … Continue reading

Posted in Java | Tagged , , | 4 Comments

Create temporary files and directories using Java NIO2

Temporary files and directories are very useful in many situations. One typical case is that you are writing some (usually large) file and you don’t want anybody to accidentally access and mess with it until is completely written and closed. … Continue reading

Posted in Java | Tagged , | 1 Comment