| 11 | package java.io; |
| 12 | |
| 13 | public abstract class Writer implements Closeable, Flushable { |
| 14 | public void write(int c) throws IOException { |
| 15 | char[] buffer = new char[] { (char) c }; |
| 16 | write(buffer); |
| 17 | } |
| 18 | |
| 19 | public void write(char[] buffer) throws IOException { |
| 20 | write(buffer, 0, buffer.length); |
| 21 | } |
| 22 | |
| 23 | public void write(String s) throws IOException { |
| 24 | write(s.toCharArray()); |
| 25 | } |
| 26 | |
| 27 | public void write(String s, int offset, int length) throws IOException { |
| 28 | char[] b = new char[length]; |
| 29 | s.getChars(offset, offset + length, b, 0); |
| 30 | write(b); |
| 31 | } |
| 32 | |
| 33 | public abstract void write(char[] buffer, int offset, int length) |
| 34 | throws IOException; |
| 35 | |
| 36 | public abstract void flush() throws IOException; |
| 37 | |
| 38 | public abstract void close() throws IOException; |
| 39 | } |
nothing calls this directly
no outgoing calls
no test coverage detected