net.fortuna.ical4j.data
Class FoldingWriter

java.lang.Object
  extended by java.io.Writer
      extended by java.io.FilterWriter
          extended by net.fortuna.ical4j.data.FoldingWriter
All Implemented Interfaces:
Closeable, Flushable, Appendable

public class FoldingWriter
extends FilterWriter

 $Id$ [Apr 6, 2004]
 
A writer that performs iCalendar folding as it writes.

Author:
Ben Fortuna

Field Summary
static int MAX_FOLD_LENGTH
          Lines of text SHOULD NOT be longer than 75 octets, excluding the line break.
static int REDUCED_FOLD_LENGTH
          reduced to 73 to be consistent with Apple iCal..
 
Fields inherited from class java.io.FilterWriter
out
 
Fields inherited from class java.io.Writer
lock
 
Constructor Summary
FoldingWriter(Writer writer)
           
FoldingWriter(Writer writer, int foldLength)
           
 
Method Summary
 void write(char[] buffer, int offset, int length)
          
 void write(int c)
          
 void write(String str, int off, int len)
          
 
Methods inherited from class java.io.FilterWriter
close, flush
 
Methods inherited from class java.io.Writer
append, append, append, write, write
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

REDUCED_FOLD_LENGTH

public static final int REDUCED_FOLD_LENGTH
reduced to 73 to be consistent with Apple iCal..

See Also:
Constant Field Values

MAX_FOLD_LENGTH

public static final int MAX_FOLD_LENGTH
Lines of text SHOULD NOT be longer than 75 octets, excluding the line break.

See Also:
Constant Field Values
Constructor Detail

FoldingWriter

public FoldingWriter(Writer writer,
                     int foldLength)
Parameters:
writer - a writer to write output to
foldLength - the maximum line length

FoldingWriter

public FoldingWriter(Writer writer)
Parameters:
writer - a writer to write output to
Method Detail

write

public final void write(int c)
                 throws IOException

Overrides:
write in class FilterWriter
Throws:
IOException

write

public final void write(char[] buffer,
                        int offset,
                        int length)
                 throws IOException

Overrides:
write in class FilterWriter
Throws:
IOException

write

public final void write(String str,
                        int off,
                        int len)
                 throws IOException

Overrides:
write in class FilterWriter
Throws:
IOException


Copyright © 2004-2012 Micronode. All Rights Reserved.