Advertisement
Guest User

Untitled

a guest
Oct 25th, 2014
133
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.56 KB | None | 0 0
  1. public void run() {
  2.  
  3. try {
  4. Scanner s = new Scanner(f);
  5.  
  6. while (isRunning) {
  7.  
  8. try {
  9. if (s.hasNext()) {
  10. text.put(s.next());
  11. } else {
  12. isRunning = false;
  13. }
  14. } catch (InterruptedException ex) {
  15.  
  16. Logger.getLogger(inputClass.class.getName()).log(Level.SEVERE, null, ex);
  17. }
  18.  
  19. }
  20.  
  21. } catch (FileNotFoundException ex) {
  22. Logger.getLogger(inputClass.class.getName()).log(Level.SEVERE, null, ex);
  23. }
  24.  
  25. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement