@@ -0,0 +1,1075 @@
+package ru.agolovin;%0A%0Aimport java.io.File;%0Aimport java.io.IOException;%0Aimport java.nio.file.Files;%0Aimport java.nio.file.Paths;%0Aimport java.util.List;%0Aimport java.util.concurrent.CopyOnWriteArrayList;%0A%0A/**%0A * @author agolovin (agolovin@list.ru)%0A * @version $Id$%0A * @since 0.1%0A */%0A%0Apublic class ParallelSearch %7B%0A%0A    private List%3CString%3E result = new CopyOnWriteArrayList%3C%3E();%0A%0A    public void parallelSearch(String root, String text, List%3CString%3E exts) %7B%0A        File%5B%5D files = new File(root).listFiles();%0A%0A    %7D%0A%0A    private void searchTextInFile(final String text, final List%3CString%3E fileList) %7B%0A        for (String element : fileList) %7B%0A            if (element != null) %7B%0A                try %7B%0A                    byte%5B%5D bytes = Files.readAllBytes(Paths.get(element));%0A                    String str = new String(bytes);%0A                    if (str.contains(text)) %7B%0A                        this.result.add(element);%0A                    %7D%0A                %7D catch (IOException e) %7B%0A                    e.printStackTrace();%0A                %7D%0A            %7D%0A        %7D%0A    %7D%0A%0A%7D%0A

add task4 in part3 chapter7 package2