Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## net.fortuna.ical4j.util
Class Calendars

    java.lang.Object
      net.fortuna.ical4j.util.Calendars

    public final class Calendars

extends Object

Utility method for working with `Calendar`s.

Author:
  Ben Fortuna

Method Summary
`static Calendar` | `load(String filename)` Loads a calendar from the specified file.
`static Calendar` | `merge(Calendar c1, Calendar c2)` Merge all properties and components from two specified calendars into one instance.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Method Detail

### load

    public static Calendar load(String filename)
                         throws IOException,
                                ParserException

  Loads a calendar from the specified file.

  Parameters:
    `filename` - the name of the file from which to load calendar data
  Returns:
    returns a new calendar instance initialised from the specified file
  Throws:
    `IOException` - occurs when there is an error reading the specified file
    `ParserException` - occurs when the data in the specified file is invalid

### merge

    public static Calendar merge(Calendar c1,
                                 Calendar c2)

  Merge all properties and components from two specified calendars into one instance. Note that the merge process is not very sophisticated, and may result in invalid calendar data (e.g. multiple properties of a type that should only be specified once).

  Parameters:
    `c1` - the first calendar to merge
    `c2` - the second calendar to merge
  Returns:
    a Calendar instance containing all properties and components from both of the specified calendars

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2004-2007 Modularity. All Rights Reserved.