|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.openbp.common.string.TextUtil
public final class TextUtil
Text utilities.
| Method Summary | |
|---|---|
static void |
appendHTMLLine(java.lang.String line,
java.lang.StringBuffer output,
int maxLength)
Appends the given text as HTML line to the output. |
static java.util.List |
breakIntoLines(java.lang.String s,
boolean trim,
int maxLength)
Breaks a single string into a list of lines. |
static java.lang.String |
concatLines(java.util.Iterator lineIterator)
Concatenates several lines into one string. |
static java.lang.String |
convertToHTML(java.lang.String[] paragraphs,
boolean boldTitle,
int separatorPos,
int maxLength)
Converts regular text to an HTML form that can be used for display in browsers or tool tips. |
static java.lang.String |
decodeMultiLineString(java.lang.String s)
Trims the string and converts all newline and tab escape representations to their character values. |
static java.lang.String |
encodeMultiLineString(java.lang.String s)
Trims the string and converts all newline and tab character to an escape representation. |
static java.lang.String |
extractSummary(java.lang.String text)
Extracts a summary from an object description. |
| 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 extractSummary(java.lang.String text)
text - Description text
public static java.util.List breakIntoLines(java.lang.String s,
boolean trim,
int maxLength)
s - The string to breaktrim - true Remove leading and trailing spaces and tabulators from each linemaxLength - Maximum length per line or -1 for unlimited line length
public static java.lang.String concatLines(java.util.Iterator lineIterator)
lineIterator - Iterator of String objects
public static java.lang.String encodeMultiLineString(java.lang.String s)
s - String to encode
public static java.lang.String decodeMultiLineString(java.lang.String s)
s - String to decode
public static java.lang.String convertToHTML(java.lang.String[] paragraphs,
boolean boldTitle,
int separatorPos,
int maxLength)
paragraphs - Array of strings, each one denoting a single paragraph or nullboldTitle - true Treat the first paragraph as title and print it bold.separatorPos - Position for the separator line (-1 if no separator should be used,
0 for separator after paragraphs[0] etc.maxLength - Maximum length per line or -1 for unlimited line length
public static void appendHTMLLine(java.lang.String line,
java.lang.StringBuffer output,
int maxLength)
line - Line to appendoutput - Output string buffermaxLength - Maximum length per line or -1 for unlimited line length
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||