|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object SK.gnome.dwarf.mail.smtp.SMTPUtils
Provides useful SMTP helper methods.
Method Summary | |
static java.lang.String |
alignCenter(java.lang.String s,
char c,
int len)
Alignes the string to the center. |
static java.lang.String |
alignLeft(java.lang.String s,
char c,
int len)
Alignes the string to the left. |
static java.lang.String |
alignRight(java.lang.String s,
char c,
int len)
Alignes the string to the right. |
static java.lang.String |
formatSMTPDate(java.util.Date date)
Formats the given date as per RFC 822. |
static java.lang.String |
stripSourceRoutes(java.lang.String addr)
Strips the source routes from the given address. |
static java.lang.String |
wrapText(java.lang.String s)
Wraps the text by dividing it to lines of max 78 characters. |
static java.lang.String |
xtextDecode(java.lang.String s)
Xtext-decodes the given string. |
static java.lang.String |
xtextEncode(java.lang.String s)
Xtext-encodes the given string. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
public static java.lang.String stripSourceRoutes(java.lang.String addr)
addr
- the address
public static java.lang.String xtextEncode(java.lang.String s)
s
- the string
public static java.lang.String xtextDecode(java.lang.String s)
s
- the string
public static java.lang.String wrapText(java.lang.String s)
It splits the input string into lines separated by CRLF sequences, each max 78 characters long, and returns it in a single string. The splitting is done by either space, horizontal tab or newline characters.
s
- the string
public static java.lang.String formatSMTPDate(java.util.Date date)
date
- the date
public static java.lang.String alignLeft(java.lang.String s, char c, int len)
s
- the string to bealignedc
- the padding characterlen
- the desired length of the string
public static java.lang.String alignRight(java.lang.String s, char c, int len)
s
- the string to bealignedc
- the padding characterlen
- the desired length of the string
public static java.lang.String alignCenter(java.lang.String s, char c, int len)
s
- the string to bealignedc
- the padding characterlen
- the desired length of the string
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |