public int read(byte b[], int off, int len) throws IOException {
if (b == null) {
    throw new NullPointerException();
} else if ((off < 0) || (off > b.length) || (len < 0) ||
   ((off + len) > b.length) || ((off + len) < 0)) {
    throw new IndexOutOfBoundsException();
} else if (len == 0) {
    return 0;
} int c = read();
if (c == -1) {
    return -1;
}
b[off] = (byte)c; int i = 1;
try {
    for (; i < len ; i++) {
c = read();
if (c == -1) {
    break;
}
if (b != null) {
    b[off + i] = (byte)c;
}
    }
} catch (IOException ee) {
}
return i;
    }

解决方案 »

  1.   

    那我问个简单的啊 c = read(); 这句是什么意思
      

  2.   

    c = read()
    read()是方法啊,你自己找找哪儿定义的吧
      

  3.   

    其实我就是想知道这个问题  
    public abstract int read() throws IOException; 中的read()是个抽象类。那么c = read();有什么用处呢 ?
    read()方法中什么都没有实现啊 ?这么写c到底是为了什么呢 ?
    谁说给谁100分,都给他,先到先得的
      

  4.   

    是不是根据多态性来实现的?
    由于java中以ojbect为类的根节点,所以实际上的实现
    是在objectinputstream中通过内部类BlockDataInputStream来实现的 ,对吗?
    高手们????!!!!
      

  5.   

    最后,经过查找我发现是objectinputstream中的read()来重写实现的,呵呵我知道了 。但是分给不了自己,郁闷啊
      

  6.   

    最后,经过查找我发现是objectinputstream中的read()来重写实现的,呵呵我知道了 。但是分给不了自己,郁闷啊