1 package org.simantics.graph.compiler.internal.resourceFiles;
3 import java.io.FilterWriter;
4 import java.io.IOException;
7 public class FilterCRWriter extends FilterWriter {
9 public FilterCRWriter(Writer out) {
14 public void write(int c) throws IOException {
20 public void write(char[] cbuf, int off, int len) throws IOException {
22 for(int i=0;i<len;++i) {
23 if(cbuf[off+i] == '\r') {
25 write(cbuf, off+begin, i-begin);
30 write(cbuf, off+begin, len-begin);
34 public void write(String str, int off, int len) throws IOException {
36 for(int i=0;i<len;++i) {
37 if(str.charAt(off+i) == '\r') {
39 write(str, off+begin, i-begin);
44 write(str, off+begin, len-begin);