|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.apache.geronimo.mail.util.ASCIIUtil
public class ASCIIUtil
Set of utility classes for handling common encoding-related manipulations.
| Constructor Summary | |
|---|---|
ASCIIUtil()
|
|
| Method Summary | |
|---|---|
static java.lang.String |
fold(int used,
java.lang.String s)
Perform RFC 2047 text folding on a string of text. |
static java.lang.String |
getBinaryTransferEncoding(java.io.InputStream content)
Determine if the transfer encoding looks like it might be valid ascii text, and thus transferable as 7bit code. |
static java.lang.String |
getTextTransferEncoding(java.io.InputStream content)
Examine a stream of text and make a judgement on what encoding type should be used for the text. |
static java.lang.String |
getTextTransferEncoding(java.lang.String content)
Examine a stream of text and make a judgement on what encoding type should be used for the text. |
static boolean |
isAscii(int ch)
Test to see if a given character can be considered "valid" ASCII. |
static boolean |
isAscii(java.lang.String s)
Test to see if this string contains only US-ASCII (i.e., 7-bit ASCII) charactes. |
static java.lang.String |
unfold(java.lang.String s)
Unfold a folded string. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ASCIIUtil()
| Method Detail |
|---|
public static boolean isAscii(java.lang.String s)
s - The test string.
public static boolean isAscii(int ch)
ch - The test character.
public static java.lang.String getTextTransferEncoding(java.io.InputStream content)
throws java.io.IOException
content - An input stream for the content we're examining.
java.io.IOExceptionpublic static java.lang.String getTextTransferEncoding(java.lang.String content)
content - A string for the content we're examining.
public static java.lang.String getBinaryTransferEncoding(java.io.InputStream content)
throws java.io.IOException
content - An input stream for the content we're examining.
java.io.IOException
public static java.lang.String fold(int used,
java.lang.String s)
used - The amount of text already "used up" on this line. This is
typically the length of a message header that this text
get getting added to.s - The text to fold.
public static java.lang.String unfold(java.lang.String s)
s - The folded string.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||