public ICalendar first ( ) throws IOException { StreamReader reader = constructReader ( ) ; if ( index != null ) { reader . setScribeIndex ( index ) ; } try { ICalendar ical = reader . readNext ( ) ; if ( warnings != null ) { warnings . add ( reader . getWarnings ( ) ) ; } return ical ; } finally { if ( closeWhenDone ( ) ) { reader . close ( ) ; } } }
Reads the first iCalendar object from the stream .