日期:2014-05-20 浏览次数:20868 次
/**
* The "standard" input stream. This stream is already
* open and ready to supply input data. Typically this stream
* corresponds to keyboard input or another input source specified by
* the host environment or user.
*/
public final static InputStream in = nullInputStream();
/**
* The following two methods exist because in, out, and err must be
* initialized to null. The compiler, however, cannot be permitted to
* inline access to them, since they are later set to more sensible values
* by initializeSystemClass().
*/
private static InputStream nullInputStream() throws NullPointerException {
if (currentTimeMillis() > 0) {
return null;
}
throw new NullPointerException();
}
public abstract class DemoAClass {
int i;
public abstract void read();
}
public class DemoClassI {
DemoAClass a;
public DemoClassI()
{
this.a = new DemoAClass()
{
public void read()
{
i=100000;
}
};
}
}
public int read() throws IOException {
return in.read();
}
public synchronized int read() throws IOException {
if (pos >= count) {
fill();
if (pos >= count)
return -1;
}
return getBufIfOpen()[pos++] & 0xff;
}