53 |
* @author Aaron M. Renn (arenn@urbanophile.com) |
* @author Aaron M. Renn (arenn@urbanophile.com) |
54 |
* @author Per Bothner <bothner@cygnus.com> |
* @author Per Bothner <bothner@cygnus.com> |
55 |
*/ |
*/ |
56 |
public abstract class Writer |
public abstract class Writer implements Appendable, Closeable, Flushable |
57 |
{ |
{ |
58 |
/** |
/** |
59 |
* This is the object used to synchronize criticial code sections for |
* This is the object used to synchronize criticial code sections for |
188 |
write(buf, 0, len); |
write(buf, 0, len); |
189 |
} |
} |
190 |
|
|
191 |
} // class Writer |
/** @since 1.5 */ |
192 |
|
public Writer append(char c) throws IOException |
193 |
|
{ |
194 |
|
write(c); |
195 |
|
return this; |
196 |
|
} |
197 |
|
|
198 |
|
/** @since 1.5 */ |
199 |
|
public Writer append(CharSequence cs) throws IOException |
200 |
|
{ |
201 |
|
write(cs == null ? "null" : cs.toString()); |
202 |
|
return this; |
203 |
|
} |
204 |
|
|
205 |
|
/** @since 1.5 */ |
206 |
|
public Writer append(CharSequence cs, int start, int end) throws IOException |
207 |
|
{ |
208 |
|
write(cs == null ? "null" : cs.subSequence(start, end).toString()); |
209 |
|
return this; |
210 |
|
} |
211 |
|
} |