mirror of
https://github.com/corda/corda.git
synced 2025-06-13 12:48:18 +00:00
more classpath progress
This commit is contained in:
22
classpath/java/io/Reader.java
Normal file
22
classpath/java/io/Reader.java
Normal file
@ -0,0 +1,22 @@
|
||||
package java.io;
|
||||
|
||||
public abstract class Reader {
|
||||
public int read() throws IOException {
|
||||
char[] buffer = new char[1];
|
||||
int c = read(buffer);
|
||||
if (c <= 0) {
|
||||
return -1;
|
||||
} else {
|
||||
return (int) buffer[0];
|
||||
}
|
||||
}
|
||||
|
||||
public int read(char[] buffer) throws IOException {
|
||||
return read(buffer, 0, buffer.length);
|
||||
}
|
||||
|
||||
public abstract int read(char[] buffer, int offset, int length)
|
||||
throws IOException;
|
||||
|
||||
public abstract void close() throws IOException;
|
||||
}
|
Reference in New Issue
Block a user