Skip to content

Instantly share code, notes, and snippets.

@ubourdon
Created March 10, 2012 17:34
Show Gist options
  • Save ubourdon/2012243 to your computer and use it in GitHub Desktop.
Save ubourdon/2012243 to your computer and use it in GitHub Desktop.
test("easy test") {
val urlCal = new URL("https://www.google.com/calendar/ical/u74t" +
"b1k9n53bnc5qsg3694p2l4%40group.calendar.google.com/private-4b" +
"4d566cd18fd63d76c6cc6ea84086cf/basic.ics")
val builder = new CalendarBuilder();
val cal = builder.build(urlCal.openStream());
val components: ComponentList = cal.getComponents(Component.VEVENT)
components.foreach ( x => println( x.asInstanceOf[Component].getName() ) )
}
implicit def convertJavaUtilListToScalaImmutableList[A](javaList: java.util.List[A]): List[A] = {
if( javaList == null ) Nil
else javaList.toArray.toList.map(_.asInstanceOf[A])
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment