public class LineEndNormalizingWriter extends FilterWriter
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.
out| Constructor and Description |
|---|
LineEndNormalizingWriter(Writer out) |
| Modifier and Type | Method and Description |
|---|---|
void |
write(char[] cbuf) |
void |
write(char[] cbuf,
int off,
int len) |
void |
write(int c) |
void |
write(String str) |
void |
write(String str,
int off,
int len) |
close, flushpublic LineEndNormalizingWriter(Writer out)
public void write(char[] cbuf)
throws IOException
write in class WriterIOExceptionpublic void write(String str) throws IOException
write in class WriterIOExceptionpublic void write(int c)
throws IOException
write in class FilterWriterIOExceptionpublic void write(char[] cbuf,
int off,
int len)
throws IOException
write in class FilterWriterIOExceptionpublic void write(String str, int off, int len) throws IOException
write in class FilterWriterIOExceptionCopyright © 2019. All rights reserved.