ClassReader.java 文件源码

java
阅读 35 收藏 0 点赞 0 评论 0

项目:openjdk-jdk10 作者:
ClassReader(Class cls, InputStream in) throws IOException {
    this.pkg = cls.getPackage();
    this.cls = cls;
    this.verbose = pkg.verbose;
    this.in = new DataInputStream(new FilterInputStream(in) {
        public int read(byte b[], int off, int len) throws IOException {
            int nr = super.read(b, off, len);
            if (nr >= 0)  inPos += nr;
            return nr;
        }
        public int read() throws IOException {
            int ch = super.read();
            if (ch >= 0)  inPos += 1;
            return ch;
        }
        public long skip(long n) throws IOException {
            long ns = super.skip(n);
            if (ns >= 0)  inPos += ns;
            return ns;
        }
    });
}
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号