FileDocCategorySizeDatePackage
HTMLText.javaAPI DocGlassfish v2 API3166Fri May 04 22:34:48 BST 2007com.sun.enterprise.diagnostics.report.html

HTMLText

public class HTMLText extends Object implements Text
Provide a basic implementation of a text node.

Fields Summary
private String
text
The text content of this node.
Constructors Summary
public HTMLText(String text)
Make a new text node.

param
text The text.

    
    
           	      
       
        setValue(text);
    
Methods Summary
public java.lang.StringgetValue()

        return text;
    
public voidsetValue(java.lang.String text)

        if (text == null) {
            throw new NullPointerException("Text is null.");
        }
        this.text = text;
    
public java.lang.StringtoString()

see
java.lang.Object#toString()

        return Escape.getInstance().encodeEntities(text, "");
    
public voidwrite(java.io.Writer output)

        output.append(toString());
        output.flush();
    
public voidwrite(java.io.File file)

        FileWriter fw = new FileWriter(file);
        write(fw);
        fw.close();