简体   繁体   中英

How to use an iCal calendar in a Java program from a calendar URL?

Currently I am using 2 tools to start processing an iCal calendar from URL. First, using Google Chrome I create a .ics file from the calendar URL (for example I can get URL from AirBnb) and then I use ical4j to process the created file. Is there any way to use this URL directly in the Java program?

Probably something like:

InputStream is = new URL("http://airbnb.com/ical/").openStream();
try {
   Calendar cal = new CalendarBuilder().build(is);
} finally {
  is.close();
}

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM