Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public void fileLoop() throws IOException
- {
- while(true)
- {
- try
- {
- Thread.sleep(100);
- }
- catch (InterruptedException e1)
- {
- // TODO Auto-generated catch block
- e1.printStackTrace();
- }
- if(ThreadTest.words.isEmpty())
- {
- //System.out.print("emptu");
- }
- else
- {
- for(int i = 0; i<ThreadTest.words.size();i++)
- {
- try(BufferedReader br = new BufferedReader(new FileReader(ThreadTest.words.get(i))))
- {
- String line;
- while ((line = br.readLine()) != null)
- {
- ThreadTest.lines.add(line);
- }
- }
- catch (FileNotFoundException e)
- {
- e.printStackTrace();
- }
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement