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, flush
public LineEndNormalizingWriter(Writer out)
public void write(char[] cbuf) throws IOException
write
in class Writer
IOException
public void write(String str) throws IOException
write
in class Writer
IOException
public void write(int c) throws IOException
write
in class FilterWriter
IOException
public void write(char[] cbuf, int off, int len) throws IOException
write
in class FilterWriter
IOException
public void write(String str, int off, int len) throws IOException
write
in class FilterWriter
IOException
Copyright © 2020. All rights reserved.