Categories:
Audio (13)
Biotech (29)
Bytecode (35)
Database (77)
Framework (7)
Game (7)
General (512)
Graphics (53)
I/O (32)
IDE (2)
JAR Tools (86)
JavaBeans (16)
JDBC (89)
JDK (337)
JSP (20)
Logging (103)
Mail (54)
Messaging (8)
Network (71)
PDF (94)
Report (7)
Scripting (83)
Security (32)
Server (119)
Servlet (17)
SOAP (24)
Testing (50)
Web (19)
XML (301)
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/io/PipedWriter.java
/* * @(#)PipedWriter.java 1.7 01/12/10 * * Copyright 2002 Sun Microsystems, Inc. All rights reserved. * SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms. */ package java.io; /** * Piped character-output streams. * * @version 1.7, 01/12/10 * @author Mark Reinhold * @since JDK1.1 */ public class PipedWriter extends Writer { PipedOutputStream byteSource; private byte buf[]; /* Conversion buffer */ /** * Create a writer that is not yet connected to a piped reader. */ public PipedWriter() { byteSource = new PipedOutputStream(); } /** * Create a writer for the specified piped character-input stream. */ public PipedWriter(PipedReader sink) throws IOException { this(); connect(sink); } /** Check to make sure that the stream has not been closed */ private void ensureOpen() throws IOException { if (byteSource == null) throw new IOException("Stream closed"); } /** * Connect the specified piped reader to this writer. */ public void connect(PipedReader sink) throws IOException { synchronized (lock) { ensureOpen(); byteSource.connect(sink.byteSink); } } /** * Write a portion of an array of characters. * * @param cbuf Array of characters * @param off Offset from which to start writing characters * @param len Number of characters to write * * @exception IOException If an I/O error occurs */ public void write(char cbuf[], int off, int len) throws IOException { synchronized (lock) { ensureOpen(); int nb = len * 2; if ((buf == null) || (buf.length < nb)) buf = new byte[nb]; for (int i = 0; i < nb; i += 2) { char c = cbuf[off + (i >> 1)]; buf[i] = (byte) (c >> 8); buf[i + 1] = (byte) c; } byteSource.write(buf, 0, nb); } } /** * Flush the stream. * * @exception IOException If an I/O error occurs */ public void flush() throws IOException { synchronized (lock) { ensureOpen(); byteSource.flush(); } } /** * Close the stream. * * @exception IOException If an I/O error occurs */ public void close() throws IOException { synchronized (lock) { if (byteSource == null) return; byteSource.close(); byteSource = null; } } }
⏎ java/io/PipedWriter.java
Â
⇒ Backup JDK 1.1 Installation Directory
⇠JDK 1.1 classes.zip - Java Core Classes
2018-11-17, 92050👍, 0💬
Popular Posts:
How to display XML element type information with the jaxp\TypeInfoWriter.java provided in the Apache...
MXP1 is a stable XmlPull parsing engine that is based on ideas from XPP and in particular XPP2 but c...
JSP(tm) Standard Tag Library 1.1 implementation - Jakarta Taglibs hosts the Standard Taglib 1.1, an ...
io.jar is a component in iText Java library to provide input/output functionalities. iText Java libr...
What Is HttpComponents commons-httpclient-3.1.j ar?HttpComponents commons-httpclient-3.1.j aris the ...