package org.simantics.graph.compiler.internal.resourceFiles; import java.io.FilterWriter; import java.io.IOException; import java.io.Writer; public class FilterCRWriter extends FilterWriter { public FilterCRWriter(Writer out) { super(out); } @Override public void write(int c) throws IOException { if(c != '\r') out.write(c); } @Override public void write(char[] cbuf, int off, int len) throws IOException { int begin = 0; for(int i=0;i begin) out.write(cbuf, off+begin, i-begin); begin = i+1; } } if(len > begin) out.write(cbuf, off+begin, len-begin); } @Override public void write(String str, int off, int len) throws IOException { int begin = 0; for(int i=0;i begin) out.write(str, off+begin, i-begin); begin = i+1; } } if(len > begin) out.write(str, off+begin, len-begin); } }