@Override public void write(int c) throws IOException { log.write("writer["); log.write(Long.toString(id)); log.write("].write("); log.write(Integer.toString(c)); log.write(");\n"); log.flush(); wrapped.write(c); }
@Override public void write(String str) throws IOException { log.write("writer["); log.write(Long.toString(id)); log.write("].write("); log(str); log.write(");\n"); log.flush(); wrapped.write(str); }
@Override public void write(String str, int off, int len) throws IOException { log.write("writer["); log.write(Long.toString(id)); log.write("].write("); log(str); log.write(", "); log.write(Integer.toString(off)); log.write(", "); log.write(Integer.toString(len)); log.write(");\n"); log.flush(); wrapped.write(str, off, len); }
@Override public void write(String str) throws IOException { if(isInitialBuffer) { switchIfNeeded(buffer.getLength() + str.length()); } buffer.write(str); }
@Override public void write(char cbuf[]) throws IOException { log.write("writer["); log.write(Long.toString(id)); log.write("].write("); log(new String(cbuf)); log.write(".toCharArray());\n"); /* log.write("writer["); log.write(Long.toString(id)); log.write("].write(new char[] {"); for(int i=0, end=cbuf.length; i<end; i++) { if((i%50)==0) log.write("\n "); if(i>0) log.write(','); log(cbuf[i]); } log.write("\n});\n"); */ log.flush(); wrapped.write(cbuf); }
@Override public void write(char cbuf[], int off, int len) throws IOException { log.write("writer["); log.write(Long.toString(id)); log.write("].write("); log(new String(cbuf, 0, off+len)); log.write(".toCharArray(), "); log.write(Integer.toString(off)); log.write(", "); log.write(Integer.toString(len)); log.write(");\n"); /* log.write("writer["); log.write(Long.toString(id)); log.write("].write(new char[] {"); for(int i=0, end=off+len; i<end; i++) { if((i%50)==0) log.write("\n "); if(i>0) log.write(','); log(cbuf[i]); } log.write("\n}, "); log.write(Integer.toString(off)); log.write(", "); log.write(Integer.toString(len)); log.write(");\n"); */ log.flush(); wrapped.write(cbuf, off, len); }
@Override public void write(int c) throws IOException { if(isInitialBuffer) { switchIfNeeded(buffer.getLength() + 1); } buffer.write(c); }
@Override public void write(char cbuf[], int off, int len) throws IOException { if(isInitialBuffer) { switchIfNeeded(buffer.getLength() + len); } buffer.write(cbuf, off, len); }
@Override public void write(char cbuf[]) throws IOException { if(isInitialBuffer) { switchIfNeeded(buffer.getLength() + cbuf.length); } buffer.write(cbuf); }
@Override public void write(String str, int off, int len) throws IOException { if(isInitialBuffer) { switchIfNeeded(buffer.getLength() + len); } buffer.write(str, off, len); }