Class RFC5545Util
java.lang.Object
de.uplanet.lucy.server.auxiliaries.calendar.RFC5545Util
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionencodeText(Object p_value) Encode text according to RFC 5545, 3.3.11.encodeText(Object p_firstLineOffset, Object p_value) Encode text according to RFC 5545, 3.3.11.encodeTextNotNull(Object p_value) Encode text according to RFC 5545, 3.3.11.encodeTextNotNull(Object p_firstLineOffset, Object p_value) Encode text according to RFC 5545, 3.3.11.foldContentLine(Object p_value) Fold the given content line according to RFC 5545, 3.1.foldContentLine(Object p_firstLineOffset, Object p_value) Fold the given content line according to RFC 5545, 3.1.foldContentLineNotNull(Object p_value) Fold the given content line according to RFC 5545, 3.1.foldContentLineNotNull(Object p_firstLineOffset, Object p_value) Fold the given content line according to RFC 5545, 3.1.formatDateTimeLocal(Object p_date, TimeZone p_tz) The format the given value, according to RFC 5545,FORM #1: DATE WITH LOCAL TIME.formatDateTimeLocalWithTimeZoneReference(Object p_date, TimeZone p_tz) The format the given value, according to RFC 5545,FORM #3: DATE WITH LOCAL TIME AND TIME ZONE REFERENCE.formatDateTimeUTC(Object p_date) The format the given value, according to RFC 5545,FORM #2: DATE WITH UTC TIME.The product identifierPRODID, according to RFC 5545, 3.7.3.quotePropertyParameterValue(Object p_value) Quote the given property parameter value according to RFC 5545, 3.2, if necessary.quotePropertyParameterValueNotNull(Object p_value) Quote the given property parameter value according to RFC 5545, 3.2, if necessary.
-
Constructor Details
-
RFC5545Util
public RFC5545Util()
-
-
Method Details
-
getProdId
The product identifierPRODID, according to RFC 5545, 3.7.3.- Returns:
- The product identifier.
-
foldContentLine
Fold the given content line according to RFC 5545, 3.1.- Parameters:
p_firstLineOffset- The first line offset, either an integer, or a character sequence from which the length is taken.p_value- The content line. If this isnull, or a value holder that does not contain a value, the line is assumed to be empty and no exception is thrown.- Returns:
- The folded content line.
-
foldContentLineNotNull
Fold the given content line according to RFC 5545, 3.1.- Parameters:
p_firstLineOffset- The first line offset, either an integer, or a character sequence from which the length is taken.p_value- The content line. If this isnull, or a value holder that does not contain a value, anIllegalArgumentExceptionis thrown.- Returns:
- The folded content line.
- Throws:
IllegalArgumentException- Ifp_valueisnull, or a value holder that does not contain a value.
-
foldContentLine
Fold the given content line according to RFC 5545, 3.1.- Parameters:
p_value- The content line. If this isnull, or a value holder that does not contain a value, the line is assumed to be empty and no exception is thrown.- Returns:
- The folded content line.
-
foldContentLineNotNull
Fold the given content line according to RFC 5545, 3.1.- Parameters:
p_value- The content line. If this isnull, or a value holder that does not contain a value, anIllegalArgumentExceptionis thrown.- Returns:
- The folded content line.
- Throws:
IllegalArgumentException- Ifp_valueisnull, or a value holder that does not contain a value.
-
encodeText
Encode text according to RFC 5545, 3.3.11.- Parameters:
p_firstLineOffset- The first line offset, either an integer, or a character sequence from which the length is taken.p_value- The text. If this isnull, or a value holder that does not contain a value, the line is assumed to be empty and no exception is thrown.- Returns:
- The encoded text.
-
encodeTextNotNull
Encode text according to RFC 5545, 3.3.11.- Parameters:
p_firstLineOffset- The first line offset, either an integer, or a character sequence from which the length is taken.p_value- The text. If this isnull, or a value holder that does not contain a value, anIllegalArgumentExceptionis thrown.- Returns:
- The encoded text.
- Throws:
IllegalArgumentException- Ifp_valueisnull, or a value holder that does not contain a value.
-
encodeText
Encode text according to RFC 5545, 3.3.11.- Parameters:
p_value- The text. If this isnull, or a value holder that does not contain a value, the line is assumed to be empty and no exception is thrown.- Returns:
- The encoded text.
-
encodeTextNotNull
Encode text according to RFC 5545, 3.3.11.- Parameters:
p_value- The text. If this isnull, or a value holder that does not contain a value, anIllegalArgumentExceptionis thrown.- Returns:
- The encoded text.
- Throws:
IllegalArgumentException- Ifp_valueisnull, or a value holder that does not contain a value.
-
quotePropertyParameterValue
Quote the given property parameter value according to RFC 5545, 3.2, if necessary.- Parameters:
p_value- The property parameter value. If this isnull, or a value holder that does not contain a value, the value is assumed to be empty and no exception is thrown.- Returns:
- The optionally quoted property parameter value.
- Throws:
IllegalArgumentException- Ifp_valueisnull, or a value holder that does not contain a value.
-
quotePropertyParameterValueNotNull
Quote the given property parameter value according to RFC 5545, 3.2, if necessary.- Parameters:
p_value- The property parameter value. If this isnull, or a value holder that does not contain a value, anIllegalArgumentExceptionis thrown.- Returns:
- The optionally quoted property parameter value.
- Throws:
IllegalArgumentException- Ifp_valueisnull, or a value holder that does not contain a value.
-
formatDateTimeLocal
The format the given value, according to RFC 5545,FORM #1: DATE WITH LOCAL TIME.The method accepts
- date objects,
- timestamp objects,
- value holders,
- numbers, and
- calendar objects
- Parameters:
p_date- An object that references a date.p_tz- The local time zone.- Returns:
- The product identifier.
-
formatDateTimeLocalWithTimeZoneReference
The format the given value, according to RFC 5545,FORM #3: DATE WITH LOCAL TIME AND TIME ZONE REFERENCE.The method accepts
- date objects,
- timestamp objects,
- value holders,
- numbers, and
- calendar objects
- Parameters:
p_date- An object that references a date.p_tz- The local time zone.- Returns:
- The product identifier.
-
formatDateTimeUTC
The format the given value, according to RFC 5545,FORM #2: DATE WITH UTC TIME.The method accepts
- date objects,
- timestamp objects,
- value holders,
- numbers, and
- calendar objects
- Parameters:
p_date- An object that references a date.- Returns:
- The product identifier.
-