Archives for the 'toolset' Category

Reading files a la for-each loop.

Tuesday, January 27th, 2009

This post will show you how to use the for-each loop for reading files.  This approach tried to replace the following approach

try {
BufferedReader in = new BufferedReader(new FileReader("infilename"));
String str;
[...]

programming, toolset | No Comments

A live template for Java 5 Locks

Saturday, April 26th, 2008

Every time I used Java 5 new locks I found myself writing the same lock.lock(); try {…} finally {lock.unlock();} over and over again. Sometimes I’ve even coded, unintentionally, a lock.lock() instead of a lock.unlock(). Because of this and other reasons which I won’t share (i.e., I don’t like to copy & paste stuff) I [...]

toolset | No Comments

 

March 2010
M T W T F S S
« Jul    
1234567
891011121314
15161718192021
22232425262728
293031  

Categories

Archives

Tags