mirror of
https://github.com/corda/corda.git
synced 2025-01-06 05:04:20 +00:00
30 lines
711 B
Java
30 lines
711 B
Java
package java.io;
|
|
|
|
public abstract class Writer {
|
|
public void write(int c) throws IOException {
|
|
char[] buffer = new char[] { (char) c };
|
|
write(buffer);
|
|
}
|
|
|
|
public void write(char[] buffer) throws IOException {
|
|
write(buffer, 0, buffer.length);
|
|
}
|
|
|
|
public void write(String s) throws IOException {
|
|
write(s.toCharArray());
|
|
}
|
|
|
|
public void write(String s, int offset, int length) throws IOException {
|
|
char[] b = new char[length];
|
|
s.getChars(offset, length, b, 0);
|
|
write(b);
|
|
}
|
|
|
|
public abstract void write(char[] buffer, int offset, int length)
|
|
throws IOException;
|
|
|
|
public abstract void flush() throws IOException;
|
|
|
|
public abstract void close() throws IOException;
|
|
}
|