Prova ad implementae il codice spiegato in questo link

http://www-128.ibm.com/developerwork...ary/j-mer0322/