biweekly.io.text
Class FoldingScheme

java.lang.Object
  extended by biweekly.io.text.FoldingScheme

public class FoldingScheme
extends Object

Specifies how an iCalendar object should be folded when written to a string.

Author:
Michael Angstadt

Field Summary
static FoldingScheme DEFAULT
          Folds lines according to RFC specification (75 characters not including CRLF, with 1 space as indentation).
 
Constructor Summary
FoldingScheme(int lineLength, String indent)
           
 
Method Summary
 String getIndent()
          Gets the string that is used to indent the folded line.
 int getLineLength()
          Gets the maximum number of characters that can exist on a line before needing to be folded (not including the newline).
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEFAULT

public static final FoldingScheme DEFAULT
Folds lines according to RFC specification (75 characters not including CRLF, with 1 space as indentation).

Constructor Detail

FoldingScheme

public FoldingScheme(int lineLength,
                     String indent)
Parameters:
lineLength - the maximum number of characters that can exist on a line before needing to be folded (not including the newline)
indent - the string to use for indentation
Throws:
IllegalArgumentException - if the line length is <= 0, or if the line length is less than the length of the indentation string
Method Detail

getLineLength

public int getLineLength()
Gets the maximum number of characters that can exist on a line before needing to be folded (not including the newline).

Returns:
the max line length

getIndent

public String getIndent()
Gets the string that is used to indent the folded line.

Returns:
the indent string


Copyright © 2013 Michael Angstadt. All Rights Reserved.