- Since:
- 3.0.0
- Author:
- Dennis.Chen, tomyeh
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SmartWriter
public SmartWriter(java.io.Writer writer)
close
public void close()
throws java.io.IOException
- Throws:
java.io.IOException
flush
public void flush()
throws java.io.IOException
- Throws:
java.io.IOException
write
public SmartWriter write(Component comp)
throws java.io.IOException
- Write a component.
It works even if the component is null.
- Throws:
java.io.IOException
writeln
public SmartWriter writeln(Component comp)
throws java.io.IOException
- Write a component.
It works even if the component is null.
- Throws:
java.io.IOException
writeChildren
public SmartWriter writeChildren(Component comp)
throws java.io.IOException
- Writes all children.
- Throws:
java.io.IOException
writeChildren
public SmartWriter writeChildren(Component comp,
int from,
int to)
throws java.io.IOException
- Writes children in the specified range.
- Parameters:
from - the first index (included).to - the last index (included).
- Throws:
java.io.IOException
writeComponents
public SmartWriter writeComponents(java.util.Collection comps)
throws java.io.IOException
- Writes a list of components.
- Throws:
java.io.IOException
writeComponents
public SmartWriter writeComponents(java.util.List comps,
int from,
int to)
throws java.io.IOException
- Writes a list of component in the specified range.
- Parameters:
from - the first index (included).to - the last index (included).
- Throws:
java.io.IOException
write
public SmartWriter write(java.lang.String str)
throws java.io.IOException
- Write a string.
If str is null, nothing will be written.
- Parameters:
str - a string to be written
- Returns:
- this object
- Throws:
java.io.IOException - if failed to write
writeln
public SmartWriter writeln()
throws java.io.IOException
- Write new line.
- Returns:
- this object
- Throws:
java.io.IOException - if failed to write
writeln
public SmartWriter writeln(java.lang.String str)
throws java.io.IOException
- Write a string, and then write a new line.
If str is null, nothing will be written.
- Parameters:
str - a string to be written
- Returns:
- this object
- Throws:
java.io.IOException - if failed to write
write
public SmartWriter write(java.lang.String str,
boolean trim)
throws java.io.IOException
- Write a string.
If trim is true, then a trimed string will be written.
If str is null, nothing will be written.
- Parameters:
str - a string to be writtentrim - trim str when write.
- Returns:
- this object
- Throws:
java.io.IOException - if failed to write
writeln
public SmartWriter writeln(java.lang.String str,
boolean trim)
throws java.io.IOException
- Write a string, and then write a new line.
If trim is true, then a trimed string will be written.
If str is null, nothing will be written.
- Parameters:
str - a string to be writtentrim - trim str when write.
- Returns:
- this object
- Throws:
java.io.IOException - if failed to write
write
public SmartWriter write(boolean b)
throws java.io.IOException
- Writes a boolean.
- Throws:
java.io.IOException
write
public SmartWriter write(char c)
throws java.io.IOException
- Writes a char.
- Throws:
java.io.IOException
writeln
public SmartWriter writeln(char c)
throws java.io.IOException
- Writes a char with a line feed.
- Throws:
java.io.IOException
write
public SmartWriter write(byte v)
throws java.io.IOException
- Writes a byte.
- Throws:
java.io.IOException
write
public SmartWriter write(short v)
throws java.io.IOException
- Writes a short.
- Throws:
java.io.IOException
write
public SmartWriter write(int v)
throws java.io.IOException
- Writes an integer.
- Throws:
java.io.IOException
write
public SmartWriter write(float v)
throws java.io.IOException
- Writes a float.
- Throws:
java.io.IOException
write
public SmartWriter write(double v)
throws java.io.IOException
- Writes a double.
- Throws:
java.io.IOException
writeAttr
public SmartWriter writeAttr(java.lang.String name,
java.lang.Object val)
throws java.io.IOException
- Writes an attribute.
The output is generated only if val is not null (and not empty).
- Throws:
java.io.IOException
Copyright © 2005-2009 Potix Corporation. All Rights Reserved.