unit
Class WhiteSpaceStripper

java.lang.Object
  |
  +--java.io.Writer
        |
        +--java.io.FilterWriter
              |
              +--unit.WhiteSpaceStripper

public class WhiteSpaceStripper
extends java.io.FilterWriter

Replaces all sequences of white space characters (space, tab, newline and carriage return) by one space character.

See Also:
Writer

Constructor Summary
WhiteSpaceStripper(java.io.Writer out)
          Creates a new white space filter.
 
Method Summary
 void dontStrip(char anyCharacter)
          Explicitly writes and does not strip the character argument.
 void newline()
          Explicitly writes and does not strip a newline character sequence (default encoding: System.getProperty("line.separator")).
 void space()
          Explicitly writes and does not strip a space character.
 void tab()
          Explicitly writes and does not strip a tab character.
 void write(char[] cbuf, int off, int len)
           
 void write(int c)
           
 void write(java.lang.String str, int off, int len)
           
 
Methods inherited from class java.io.FilterWriter
close, flush
 
Methods inherited from class java.io.Writer
write, write
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

WhiteSpaceStripper

public WhiteSpaceStripper(java.io.Writer out)
Creates a new white space filter.
Parameters:
out - the target of the resulting output.
Method Detail

write

public void write(char[] cbuf,
                  int off,
                  int len)
           throws java.io.IOException
Overrides:
write in class java.io.FilterWriter
See Also:
Writer

write

public void write(java.lang.String str,
                  int off,
                  int len)
           throws java.io.IOException
Overrides:
write in class java.io.FilterWriter
See Also:
Writer

write

public void write(int c)
           throws java.io.IOException
Overrides:
write in class java.io.FilterWriter
See Also:
Writer

newline

public void newline()
             throws java.io.IOException
Explicitly writes and does not strip a newline character sequence (default encoding: System.getProperty("line.separator")).

tab

public void tab()
         throws java.io.IOException
Explicitly writes and does not strip a tab character.

space

public void space()
           throws java.io.IOException
Explicitly writes and does not strip a space character.

dontStrip

public void dontStrip(char anyCharacter)
               throws java.io.IOException
Explicitly writes and does not strip the character argument.