see http://stackoverflow.com/questions/3976344/handling-interruptedexception-in-java