Advertisement
Guest User

Untitled

a guest
May 5th, 2015
289
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.58 KB | None | 0 0
  1. public void run() // Method to run the thread.
  2. {
  3. Process process;
  4. DataOutputStream out;
  5.  
  6. try {
  7. out = new DataOutputStream(new FileOutputStream(fileName));
  8.  
  9. PrintWriter printWriter = new PrintWriter(out);
  10.  
  11. while(runList.isEmpty() == false)
  12. {
  13. process = runList.deQueue();
  14. process.run(printWriter);
  15. }
  16.  
  17. printWriter.close();
  18. } catch (FileNotFoundException | InstantiationException | IllegalAccessException | InterruptedException e)
  19. {
  20. // TODO Auto-generated catch block
  21. e.printStackTrace();
  22. }
  23. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement