我在 CentOS 服务器上安装了 JRE (1.6_34) 的 64 位 linux 发行版。我拉下源代码并深入研究java.net.SocketInputStream
类。
该类有一个名为的方法socketRead0
:
/**
* Reads into an array of bytes at the specified offset using
* the received socket primitive.
* @param fd the FileDescriptor
* @param b the buffer into which the data is read
* @param off the start offset of the data
* @param len the maximum number of bytes read
* @param timeout the read timeout in ms
* @return the actual number of bytes read, -1 is
* returned when the end of the stream is reached.
* @exception IOException If an I/O error has occurred.
*/
private native int socketRead0(FileDescriptor fd,
byte b[], int off, int len, int timeout)
throws IOException;
我在哪里可以找到执行此SocketInputStream#socketRead0
方法时执行的本机源代码?提前致谢!