hudson.util
Class LineEndNormalizingWriter

java.lang.Object
  extended by java.io.Writer
      extended by java.io.FilterWriter
          extended by hudson.util.LineEndNormalizingWriter
All Implemented Interfaces:
Closeable, Flushable, Appendable

Deprecated. since 2008-05-28. moved to stapler

public class LineEndNormalizingWriter
extends FilterWriter

Finds the lone LF and converts that to CR+LF.

Internet Explorer's XmlHttpRequest.responseText seems to normalize the line end, and if we only send LF without CR, it will not recognize that as a new line. To work around this problem, we use this filter to always convert LF to CR+LF.

Author:
Kohsuke Kawaguchi

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

Constructor Detail

LineEndNormalizingWriter

public LineEndNormalizingWriter(Writer out)
Deprecated. 
Method Detail

write

public void write(char[] cbuf)
           throws IOException
Deprecated. 
Overrides:
write in class Writer
Throws:
IOException

write

public void write(String str)
           throws IOException
Deprecated. 
Overrides:
write in class Writer
Throws:
IOException

write

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

write

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

write

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


Copyright © 2004-2013. All Rights Reserved.