Code example for StringWriter

Methods: flushtoString

0
     * @return String of the HTML element 
     */ 
    public String toString()
    { 
        try{ 
            StringWriter out = new StringWriter();
            write(out);
            out.flush();
            return out.toString();
        } 
        catch(IOException e){
            Log.ignore(e);
        } 
        return null;     
    } 
     
    /* ----------------------------------------------------------------- */ 
    /** left justify. 
     * Convenience method equivalent to attribute("align","left"). Not 
     * applicable to all Elements.