Archive for November 19th, 2005
Listening changes on a text file (Unix Tail implementation with Java)
10 Comments Published November 19th, 2005 in Javapublic class Tail { public static void main(String[] args) throws IOException { Reader fileReader = new FileReader(args[0]); BufferedReader input = new BufferedReader(fileReader); String line = null; while (true) { if ((line = input.readLine()) != null) { System.out.println(line); continue; } try { Thread.sleep(1000L); } catch (InterruptedException x) { Thread.currentThread().interrupt(); break; } } input.close(); } } Easy [...]
Search
About
You are currently browsing the NewInstance weblog archives for the day Saturday, November 19th, 2005.
Longer entries are truncated. Click the headline of an entry to read it in its entirety.Calendar
| M | T | W | T | F | S | S |
|---|---|---|---|---|---|---|
| « Oct | Dec » | |||||
| 1 | 2 | 3 | 4 | 5 | 6 | |
| 7 | 8 | 9 | 10 | 11 | 12 | 13 |
| 14 | 15 | 16 | 17 | 18 | 19 | 20 |
| 21 | 22 | 23 | 24 | 25 | 26 | 27 |
| 28 | 29 | 30 | ||||
Archives
Categories
Tag Cloud
Android API Bash Bios CSS Development Eclipse Encription Error Handling Font Git Google GWT Hardware How-To HTML Installation iPod Java JavaScript Karmic Linux Lucks MacBook Open Source Opinion OSX Pitfalls Pkg Practices Python Resume Security Software Suspend TDD Testing Tools Top Down Tricks Ubuntu Uninstall Wakup On Lan Web Workaround
WP Cumulus Flash tag cloud by Roy Tanck and Luke Morton requires Flash Player 9 or better.




