net.sf.eos.io
Class NewlineReplaceWriter

java.lang.Object
  extended by java.io.Writer
      extended by java.io.FilterWriter
          extended by net.sf.eos.io.NewlineReplaceWriter
All Implemented Interfaces:
Closeable, Flushable, Appendable

public class NewlineReplaceWriter
extends FilterWriter

The implementation replaces linefeed (ASCII 0x0a) and carriage return (ASCII 0x0d) characters thru a space character (ASCII 0x20).

Author:
Sascha Kohlmann

Field Summary
 
Fields inherited from class java.io.FilterWriter
out
 
Fields inherited from class java.io.Writer
lock
 
Constructor Summary
NewlineReplaceWriter(Writer out)
          Creates a new writer.
 
Method Summary
 void write(char[] cbuf, int off, int len)
           
 void write(int c)
           
 void write(String str, int off, int len)
           
 
Methods inherited from class java.io.FilterWriter
close, flush
 
Methods inherited from class java.io.Writer
append, append, append, write, write
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NewlineReplaceWriter

public NewlineReplaceWriter(Writer out)
Creates a new writer.

Parameters:
out - a writer to decorate
Method Detail

write

public void write(int c)
           throws IOException
Overrides:
write in class FilterWriter
Throws:
IOException

write

public void write(char[] cbuf,
                  int off,
                  int len)
           throws IOException
Overrides:
write in class FilterWriter
Throws:
IOException

write

public void write(String str,
                  int off,
                  int len)
           throws IOException
Overrides:
write in class FilterWriter
Throws:
IOException


Copyright © 2008. All Rights Reserved.