import java.io.FilterOutputStream;
import java.io.IOException;
import java.io.OutputStream;


public class BRFilter extends FilterOutputStream {
	String temp = "";
	public BRFilter(OutputStream out){
		super(out);
	}
	
	public void write(int b)throws IOException{
		if(b == '\r')return;
		if(b == '\n'){
			out.write('<');
			out.write('B');
			out.write('R');
			out.write('>');
		}else{
			out.write(b);
		}
	}
	
	public void write(byte[] b) throws IOException{
		int i;
		for(i=0; i<b.length; i++){
			write(b[i]);
		}
	}
	
	public void write(byte[] b, int off, int len) throws IOException{
		int i;
		for(i=off; i<off+len; i++){
			write(b[i]);
		}
	}
}
