@Override public Writer append(CharSequence charSeq) throws IOException { checkNotClosed(); target.append(charSeq); return this; }
@Override public Writer append(char c) throws IOException { checkNotClosed(); target.append(c); return this; }
@Override public Writer append(CharSequence charSeq) throws IOException { checkNotClosed(); target.append(charSeq); return this; }
@Override public Writer append(CharSequence charSeq, int start, int end) throws IOException { checkNotClosed(); target.append(charSeq, start, end); return this; }
@Override public Writer append(CharSequence charSeq) throws IOException { checkNotClosed(); target.append(charSeq); return this; }
@Override public Writer append(CharSequence charSeq, int start, int end) throws IOException { checkNotClosed(); target.append(charSeq, start, end); return this; }
@Override public void write(String str, int off, int len) throws IOException { checkNotClosed(); // tricky: append takes start, end pair... target.append(str, off, off + len); }
@Override public Writer append(char c) throws IOException { checkNotClosed(); target.append(c); return this; }
@Override public void write(int c) throws IOException { checkNotClosed(); target.append((char) c); }
@Override public void write(String str) throws IOException { checkNotClosed(); target.append(str); }
@Override public void flush() throws IOException { checkNotClosed(); if (target instanceof Flushable) { ((Flushable) target).flush(); } }
@Override public void write(String str, int off, int len) throws IOException { checkNotClosed(); // tricky: append takes start, end pair... target.append(str, off, off + len); }
@Override public Writer append(CharSequence charSeq, int start, int end) throws IOException { checkNotClosed(); target.append(charSeq, start, end); return this; }
@Override public void flush() throws IOException { checkNotClosed(); if (target instanceof Flushable) { ((Flushable) target).flush(); } }
@Override public void write(String str, int off, int len) throws IOException { checkNotClosed(); // tricky: append takes start, end pair... target.append(str, off, off + len); }
@Override public Writer append(char c) throws IOException { checkNotClosed(); target.append(c); return this; }
@Override public void flush() throws IOException { checkNotClosed(); if (target instanceof Flushable) { ((Flushable) target).flush(); } }
@Override public void write(char cbuf[], int off, int len) throws IOException { checkNotClosed(); // It turns out that creating a new String is usually as fast, or faster // than wrapping cbuf in a light-weight CharSequence. See benchmark code // in comments of http://cl/9327627 and results at // https://spreadsheets.google.com/a/google.com/ccc?key=pABoWmCP48mrC_J8v4xh1ZA target.append(new String(cbuf, off, len)); }
@Override public void write(char cbuf[], int off, int len) throws IOException { checkNotClosed(); // It turns out that creating a new String is usually as fast, or faster // than wrapping cbuf in a light-weight CharSequence. See benchmark code // in comments of http://cl/9327627 and results at // https://spreadsheets.google.com/a/google.com/ccc?key=pABoWmCP48mrC_J8v4xh1ZA target.append(new String(cbuf, off, len)); }
@Override public void write(char cbuf[], int off, int len) throws IOException { checkNotClosed(); // It turns out that creating a new String is usually as fast, or faster // than wrapping cbuf in a light-weight CharSequence. See benchmark code // in comments of http://cl/9327627 and results at // https://spreadsheets.google.com/a/google.com/ccc?key=pABoWmCP48mrC_J8v4xh1ZA target.append(new String(cbuf, off, len)); }