question: public static List < ReutersDocument > extract ( Path reutersDir ) throws IOException , ParseException { List < ReutersDocument > docs = new ArrayList < > ( ) ; DirectoryStream < Path > stream = Files . newDirectoryStream ( reutersDir , "*.sgm" ) ; for ( Path sgmFile : stream ) { InputStream inputStream = Files . newInputStream ( sgmFile ) ; docs . addAll ( extractFile ( inputStream , sgmFile . toUri ( ) ) ) ; } return docs ; }
target:  Read all the SGML file in the given directory.