Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

com.tecnick.htmlutils.htmlstrings
Class HTMLStrings  view HTMLStrings download HTMLStrings.java

java.lang.Object
  extended bycom.tecnick.htmlutils.htmlstrings.HTMLStrings

public class HTMLStrings
extends java.lang.Object

Collection of static utility methods to manipulate HTML strings.

Copyright (c) 2004-2005 Tecnick.com S.r.l (www.tecnick.com) Via Ugo Foscolo n.19 - 09045 Quartu Sant'Elena (CA) - ITALY - www.tecnick.com - info@tecnick.com
Project homepage: http://htmlstrings.sourceforge.net
License: http://www.gnu.org/copyleft/lesser.html LGPL

Version:
1.0.003

Constructor Summary
HTMLStrings()
          Void Constructor.
 
Method Summary
static java.lang.String autoBR(java.lang.String str)
          Replace newlines characters sequences with <br/> element.
static java.lang.String charsetToUnicode(java.lang.String source, java.lang.String encoding)
          Converts byte-oriented character set such as ISO-8859-1 to UTF-8 Unicode.
static java.lang.String compactString(java.lang.String str)
          Replace the following characters sequences with a blank space: "\t" (ASCII 9 (0x09)), a tab "\n" (ASCII 10 (0x0A)), a new line (line feed) "\r" (ASCII 13 (0x0D)), a carriage return "\0" (ASCII 0 (0x00)), the NUL-byte "\f" ( '), a form feed.
static java.lang.String getEncodedString(java.lang.String source, java.lang.String encoding_in, java.lang.String encoding_out)
          Convert string to the requested encoding.
static java.lang.String unicodeToCharset(java.lang.String source, java.lang.String encoding)
          Converts UTF-8 Unicode strings to byte-oriented character set such as ISO-8859-1.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HTMLStrings

public HTMLStrings()
Void Constructor.

Method Detail

charsetToUnicode

public static java.lang.String charsetToUnicode(java.lang.String source,
                                                java.lang.String encoding)
Converts byte-oriented character set such as ISO-8859-1 to UTF-8 Unicode.


unicodeToCharset

public static java.lang.String unicodeToCharset(java.lang.String source,
                                                java.lang.String encoding)
Converts UTF-8 Unicode strings to byte-oriented character set such as ISO-8859-1.


getEncodedString

public static java.lang.String getEncodedString(java.lang.String source,
                                                java.lang.String encoding_in,
                                                java.lang.String encoding_out)
Convert string to the requested encoding.


compactString

public static java.lang.String compactString(java.lang.String str)
Replace the following characters sequences with a blank space:
  • "\t" (ASCII 9 (0x09)), a tab
  • "\n" (ASCII 10 (0x0A)), a new line (line feed)
  • "\r" (ASCII 13 (0x0D)), a carriage return
  • "\0" (ASCII 0 (0x00)), the NUL-byte
  • "\f" ( '), a form feed.


autoBR

public static java.lang.String autoBR(java.lang.String str)
Replace newlines characters sequences with <br/> element.