4 November 2021

More Files Methods

What can you get a Stream from?

Also, a BufferedReader has a lines() method that can offer you a Stream<String>. Files.list will give you a stream of a directory's contents.

Filtering Streams

There is an interface Predicate<T>.


java Crawler directory extension

directory: a directory
extension: file extension
Show all files having the extension living in the directory.


Print out all lines in hughJass.txt that contain a specified string. SearchHugh.java java SearchHugh syzygy spit result into a file named syzygy.finds