diff options
| author | Tom Tromey <tromey@gcc.gnu.org> | 2007-01-09 19:58:05 +0000 |
|---|---|---|
| committer | Tom Tromey <tromey@gcc.gnu.org> | 2007-01-09 19:58:05 +0000 |
| commit | 97b8365cafc3a344a22d3980b8ed885f5c6d8357 (patch) | |
| tree | 996a5f57d4a68c53473382e45cb22f574cb3e4db /libjava/classpath/java/io/Writer.java | |
| parent | c648dedbde727ca3f883bb5fd773aa4af70d3369 (diff) | |
Merged gcj-eclipse branch to trunk.
From-SVN: r120621
Diffstat (limited to 'libjava/classpath/java/io/Writer.java')
| -rw-r--r-- | libjava/classpath/java/io/Writer.java | 23 |
1 files changed, 21 insertions, 2 deletions
diff --git a/libjava/classpath/java/io/Writer.java b/libjava/classpath/java/io/Writer.java index f153e31cfed..660b6908935 100644 --- a/libjava/classpath/java/io/Writer.java +++ b/libjava/classpath/java/io/Writer.java @@ -53,7 +53,7 @@ package java.io; * @author Aaron M. Renn (arenn@urbanophile.com) * @author Per Bothner (bothner@cygnus.com) */ -public abstract class Writer +public abstract class Writer implements Appendable, Closeable, Flushable { /** * This is the object used to synchronize criticial code sections for @@ -188,5 +188,24 @@ public abstract class Writer write(buf, 0, len); } -} // class Writer + /** @since 1.5 */ + public Writer append(char c) throws IOException + { + write(c); + return this; + } + /** @since 1.5 */ + public Writer append(CharSequence cs) throws IOException + { + write(cs == null ? "null" : cs.toString()); + return this; + } + + /** @since 1.5 */ + public Writer append(CharSequence cs, int start, int end) throws IOException + { + write(cs == null ? "null" : cs.subSequence(start, end).toString()); + return this; + } +} |
