net.fortuna.ical4j.data

## Class CalendarOutputter

- java.lang.Object
- - net.fortuna.ical4j.data.AbstractOutputter
  - - net.fortuna.ical4j.data.CalendarOutputter

    public class CalendarOutputter
    extends AbstractOutputter

     $Id$ [Apr 5, 2004]

Writes an iCalendar model to an output stream.

Author:
  Ben Fortuna

### Field Summary

### Fields inherited from class net.fortuna.ical4j.data.AbstractOutputter

`DEFAULT_CHARSET, foldLength`

### Constructor Summary

Constructors
Constructor and Description
`CalendarOutputter()` Default constructor.
`CalendarOutputter(boolean validating)`
`CalendarOutputter(boolean validating, int foldLength)`

### Method Summary

Methods
`void` `output(Calendar calendar, OutputStream out)` Outputs an iCalender string to the specified output stream.
`void` `output(Calendar calendar, Writer out)` Outputs an iCalender string to the specified writer.

### Methods inherited from class net.fortuna.ical4j.data.AbstractOutputter

`isValidating, setValidating`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Constructor Detail

#### CalendarOutputter

    public CalendarOutputter()

Default constructor.

#### CalendarOutputter

    public CalendarOutputter(boolean validating)

Parameters:
  `validating` - indicates whether to validate calendar when outputting to stream

#### CalendarOutputter

    public CalendarOutputter(boolean validating,
                     int foldLength)

Parameters:
  `validating` - indicates whether to validate calendar when outputting to stream
  `foldLength` - maximum number of characters before a line is folded

### Method Detail

#### output

    public final void output(Calendar calendar,
              OutputStream out)
                      throws IOException,
                             ValidationException

Outputs an iCalender string to the specified output stream.

Parameters:
  `calendar` - calendar to write to ouput stream
  `out` - an output stream
Throws:
  `IOException` - thrown when unable to write to output stream
  `ValidationException` - where calendar validation fails

#### output

    public final void output(Calendar calendar,
              Writer out)
                      throws IOException,
                             ValidationException

Outputs an iCalender string to the specified writer.

Parameters:
  `calendar` - calendar to write to writer
  `out` - a writer
Throws:
  `IOException` - thrown when unable to write to writer
  `ValidationException` - where calendar validation fails