Devsphere.com


com.devsphere.xml.taglib.output.write
Class Filter

java.lang.Object
  |
  +--java.io.Writer
        |
        +--com.devsphere.xml.taglib.output.write.Filter

public class Filter
extends java.io.Writer

This class filters the output and removes the empty comments.


Field Summary
protected  boolean emptyComment
           
protected  boolean inComment
           
protected  java.io.Writer out
           
 
Fields inherited from class java.io.Writer
lock
 
Constructor Summary
Filter()
          Initializes the filter.
 
Method Summary
 void close()
          Closes the current writer.
 void flush()
          Flushes the current writer.
 java.io.Writer getOut()
          Gets the current writer used for output.
 void setOut(java.io.Writer out)
          Sets the current writer used for output.
 void write(char[] cbuf)
          Writes an array of characters.
 void write(char[] cbuf, int off, int len)
          Writes an array of characters.
 void write(int c)
          Writes a character.
 void write(java.lang.String str)
          Writes a string.
 void write(java.lang.String str, int off, int len)
          Writes a string.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

out

protected java.io.Writer out

inComment

protected boolean inComment

emptyComment

protected boolean emptyComment
Constructor Detail

Filter

public Filter()
Initializes the filter.

Method Detail

getOut

public java.io.Writer getOut()
Gets the current writer used for output.

Returns:
the current writer used for output

setOut

public void setOut(java.io.Writer out)
Sets the current writer used for output.

Parameters:
out - the current writer used for output

write

public void write(int c)
           throws java.io.IOException
Writes a character.

Overrides:
write in class java.io.Writer
Parameters:
c - the character to be written
Throws:
java.io.IOException - to signal any error that might occur

write

public void write(char[] cbuf)
           throws java.io.IOException
Writes an array of characters.

Overrides:
write in class java.io.Writer
Parameters:
cbuf - the characters to be written
Throws:
java.io.IOException - to signal any error that might occur

write

public void write(char[] cbuf,
                  int off,
                  int len)
           throws java.io.IOException
Writes an array of characters.

Specified by:
write in class java.io.Writer
Parameters:
cbuf - the characters to be written
off - the start position in the array
len - the number of characters to get from the array
Throws:
java.io.IOException - to signal any error that might occur

write

public void write(java.lang.String str)
           throws java.io.IOException
Writes a string.

Overrides:
write in class java.io.Writer
Parameters:
str - the string to be written
Throws:
java.io.IOException - to signal any error that might occur

write

public void write(java.lang.String str,
                  int off,
                  int len)
           throws java.io.IOException
Writes a string.

Overrides:
write in class java.io.Writer
Parameters:
str - the string to be written
off - the start position in the string
len - the number of characters to get from the string
Throws:
java.io.IOException - to signal any error that might occur

flush

public void flush()
           throws java.io.IOException
Flushes the current writer.

Specified by:
flush in class java.io.Writer
Throws:
java.io.IOException - to signal any error that might occur

close

public void close()
           throws java.io.IOException
Closes the current writer.

Specified by:
close in class java.io.Writer
Throws:
java.io.IOException - to signal any error that might occur

 Devsphere.com