more classpath progress

This commit is contained in:
Joel Dice
2007-07-28 19:29:01 -06:00
parent c96a4a5b39
commit a9e10d1c7f
22 changed files with 550 additions and 13 deletions

View File

@ -0,0 +1,22 @@
package java.io;
public class InputStreamReader extends Reader {
private final InputStream in;
public InputStreamReader(InputStream in) {
this.in = in;
}
public int read(char[] b, int offset, int length) throws IOException {
byte[] buffer = new byte[length];
int c = in.read(buffer);
for (int i = 0; i < c; ++i) {
b[i + offset] = (char) buffer[i];
}
return c;
}
public void close() throws IOException {
in.close();
}
}