Der Schockwellenreiter quotes a marvelous cautionary paragraph from Daniel Steinberg‘s article Transforming iCal Calendars with Java:

This code is presented as an example. Do not use it on data for which you don’t have a copy. It hasn’t been widely tested. Consult a professionally trained computer scientist or a twelve year old child before attempting anything difficult on your own machine.