Categories:
Audio (13)
Biotech (29)
Bytecode (36)
Database (77)
Framework (7)
Game (7)
General (507)
Graphics (53)
I/O (35)
IDE (2)
JAR Tools (101)
JavaBeans (21)
JDBC (121)
JDK (426)
JSP (20)
Logging (108)
Mail (58)
Messaging (8)
Network (84)
PDF (97)
Report (7)
Scripting (84)
Security (32)
Server (121)
Servlet (26)
SOAP (24)
Testing (54)
Web (15)
XML (309)
Collections:
Other Resources:
JDK 1.1 Source Code Directory
JDK 1.1 source code directory contains Java source code for JDK 1.1 core classes: "C:\fyicenter\jdk-1.1.8\src".
Here is the list of Java classes of the JDK 1.1 source code:
✍: FYIcenter
⏎ java/net/SocketInputStream.java
/* * @(#)SocketInputStream.java 1.17 01/12/10 * * Copyright 2002 Sun Microsystems, Inc. All rights reserved. * SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms. */ package java.net; import java.io.IOException; import java.io.FileInputStream; /** * This stream extends FileInputStream to implement a * SocketInputStream. Note that this class should <b>NOT</b> be * public. * * @version 1.17, 12/10/01 * @author Jonathan Payne * @author Arthur van Hoff */ class SocketInputStream extends FileInputStream { private boolean eof; private SocketImpl impl; private byte temp[] = new byte[1]; /** * Creates a new SocketInputStream. Can only be called * by a Socket. This method needs to hang on to the owner Socket so * that the fd will not be closed. * @param impl the implemented socket input stream */ SocketInputStream(SocketImpl impl) throws IOException { super(impl.getFileDescriptor()); this.impl = impl; } /** * Reads into an array of bytes at the specified offset using * the received socket primitive. * @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 * @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 socketRead(byte b[], int off, int len) throws IOException; /** * Reads into a byte array data from the socket. * @param b the buffer into which the data is read * @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. */ public int read(byte b[]) throws IOException { return read(b, 0, b.length); } /** * Reads into a byte array <i>b</i> at offset <i>off</i>, * <i>length</i> bytes of data. * @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 * @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. */ public int read(byte b[], int off, int length) throws IOException { if (eof) { return -1; } int n = socketRead(b, off, length); if (n <= 0) { eof = true; return -1; } return n; } /** * Reads a single byte from the socket. */ public int read() throws IOException { if (eof) { return -1; } int n = read(temp, 0, 1); if (n <= 0) { return -1; } return temp[0] & 0xff; } /** * Skips n bytes of input. * @param n the number of bytes to skip * @return the actual number of bytes skipped. * @exception IOException If an I/O error has occurred. */ public long skip(long numbytes) throws IOException { if (numbytes <= 0) { return 0; } long n = numbytes; int buflen = (int) Math.min(1024, n); byte data[] = new byte[buflen]; while (n > 0) { int r = read(data, 0, (int) Math.min((long) buflen, n)); if (r < 0) { break; } n -= r; } return numbytes - n; } /** * Returns the number of bytes that can be read without blocking. * @return the number of immediately available bytes */ public int available() throws IOException { return impl.available(); } /** * Closes the stream. */ public void close() throws IOException { impl.close(); } /** * Overrides finalize, the fd is closed by the Socket. */ protected void finalize() {} }
⏎ java/net/SocketInputStream.java
Or download all of them as a single archive file:
File name: jdk-1.1.8-src.zip File size: 1574187 bytes Release date: 2018-11-16 Download
⇒ Backup JDK 1.1 Installation Directory
2018-11-17, 150628👍, 0💬
Popular Posts:
JDK 11 java.naming.jmod is the JMOD file for JDK 11 Naming module. JDK 11 Naming module compiled cla...
JDK 11 java.security.jgss.jmod is the JMOD file for JDK 11 Security JGSS (Java Generic Security Serv...
Xalan-Java, Version 2.7.1, is an XSLT processor for transforming XML documents into HTML, text, or o...
JDK 11 java.desktop.jmod is the JMOD file for JDK 11 Desktop module. JDK 11 Desktop module compiled ...
commons-io-1.4.jar is the JAR file for Commons IO 1.4, which is a library of utilities to assist wit...