public class CalendarWriter extends Object implements IDisposable, Closeable
Allows write the set of Events in one ics file or stream.
Constructor and Description |
---|
CalendarWriter(Stream stream)
Initializes a new instance of CalendarReader with source stream and default AppointmentIcsSaveOptions.
|
CalendarWriter(Stream stream,
AppointmentIcsSaveOptions icsSaveOptions)
Initializes a new instance of CalendarReader with source file and additional AppointmentIcsSaveOptions.
|
CalendarWriter(String path)
Initializes a new instance of CalendarReader with source file and default AppointmentIcsSaveOptions.
|
CalendarWriter(String path,
AppointmentIcsSaveOptions icsSaveOptions)
Initializes a new instance of CalendarReader with source file and additional AppointmentIcsSaveOptions.
|
Modifier and Type | Method and Description |
---|---|
void |
close() |
void |
dispose()
Performs application-defined tasks associated with freeing,
releasing, or resetting unmanaged resources.
|
protected void |
dispose(boolean disposing)
Releases unmanaged and - optionally - managed resources.
|
void |
write(Appointment appointment)
Writes appointment in underlying stream.
|
public CalendarWriter(String path)
Initializes a new instance of CalendarReader with source file and default AppointmentIcsSaveOptions.
path
- Path to source file.public CalendarWriter(Stream stream)
Initializes a new instance of CalendarReader with source stream and default AppointmentIcsSaveOptions.
stream
- Source stream.public CalendarWriter(String path, AppointmentIcsSaveOptions icsSaveOptions)
Initializes a new instance of CalendarReader with source file and additional AppointmentIcsSaveOptions.
path
- Path to source file.icsSaveOptions
- Additional AppointmentIcsSaveOptions.public CalendarWriter(Stream stream, AppointmentIcsSaveOptions icsSaveOptions)
Initializes a new instance of CalendarReader with source file and additional AppointmentIcsSaveOptions.
stream
- Source stream.icsSaveOptions
- Additional AppointmentIcsSaveOptions.public final void write(Appointment appointment)
Writes appointment in underlying stream.
appointment
- Source appointmentpublic final void dispose()
Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
dispose
in interface IDisposable
protected void dispose(boolean disposing)
Releases unmanaged and - optionally - managed resources.
disposing
- true
to release
both managed and unmanaged resources; false
to release only unmanaged resources.public void close()
close
in interface Closeable
close
in interface AutoCloseable