Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.makumba
Class HtmlUtils

    java.lang.Object
      org.makumba.HtmlUtils

Direct Known Subclasses:
  HtmlChoiceWriter

    public class HtmlUtils

extends Object

This class provides basic 'text-to-HTML' functionality. Note: previously this was an existing class in the internal "util" package (fred, 2003-08-24).

Field Summary
`static String[]` | `specials`
`static String[]` | `tagExamples`

Constructor Summary
`HtmlUtils()`

Method Summary
`static boolean` | `detectHtml(String s)` Tries to detect whether input string is HTML-formatted; heuristic detection.
`static int` | `maxLineLength(String s)` Determines the maximum length of a line in a text.
`static String` | `string2html(String s)` Converts a string into its HTML correspondent using special codes.
`static String` | `stripHTMLTags(String str)` removes HTML tags and replaces double quotes by the corresponding HTML entity, so that the passed text can safely be included in HTML attributes (such as the <A> TITLE attribute)
`static String` | `text2html(String s, String startSeparator, String endSeparator)` Prints a text with very long lines.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### specials

    public static String[] specials

### tagExamples

    public static String[] tagExamples

Constructor Detail

### HtmlUtils

    public HtmlUtils()

Method Detail

### detectHtml

    public static boolean detectHtml(String s)

  Tries to detect whether input string is HTML-formatted; heuristic detection. Implementation note: For long input String, checks only first 1024 characters.

### string2html

    public static String string2html(String s)

  Converts a string into its HTML correspondent using special codes.

### maxLineLength

    public static int maxLineLength(String s)

  Determines the maximum length of a line in a text.

### text2html

    public static String text2html(String s,
                                   String startSeparator,
                                   String endSeparator)

  Prints a text with very long lines. Surrounds every paragraph with start|end- separator. FIXME bug 38.

### stripHTMLTags

    public static String stripHTMLTags(String str)

  removes HTML tags and replaces double quotes by the corresponding HTML entity, so that the passed text can safely be included in HTML attributes (such as the <A> TITLE attribute)

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Docs generated on 2009-02-25 14:20