我想查 InputStream 里面的read方法 用eclipse ctrl了一下
public int read(byte b[]) throws IOException {
return readBytes(b, 0, b.length);
    }然后我再查了一下这个readBytes结果:
private native int readBytes(byte b[], int off, int len) throws IOException;    /**
     * Reads up to <code>b.length</code> bytes of data from this input
     * stream into an array of bytes. This method blocks until some input
     * is available.
     *
     * @param      b   the buffer into which the data is read.
     * @return     the total number of bytes read into the buffer, or
     *             <code>-1</code> if there is no more data because the end of
     *             the file has been reached.
     * @exception  IOException  if an I/O error occurs.
     */就没代码了 是不是那个native
就是不不能看啊

解决方案 »

  1.   

    native方法不是用java写的.
    要想直到是什么可以看一下jni的相关知识
      

  2.   

    JDK1.6 也可以看到 1 楼的代码难道 lz 用的是 1.4
      

  3.   

    恩,jdk许多更底层的代码其实是用c写的,所以看不到,当时可以用jndi去查找来看~~~~~~
      

  4.   

    可以自己下载openjdk的代码来研究。里面有java用到的那些c/c++代码