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/StringWriter.java
/* * @(#)StringWriter.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; /** * A character stream that collects its output in a string buffer, which can * then be used to construct a string. * * @version 1.7, 01/12/10 * @author Mark Reinhold * @since JDK1.1 */ public class StringWriter extends Writer { private StringBuffer buf; /** * Create a new string writer, using the default initial string-buffer * size. */ public StringWriter() { buf = new StringBuffer(); lock = buf; } /** * Create a new string writer, using the specified initial string-buffer * size. */ protected StringWriter(int initialSize) { buf = new StringBuffer(initialSize); lock = buf; } /** * Write a single character. */ public void write(int c) { buf.append((char) c); } /** * 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 */ public void write(char cbuf[], int off, int len) { buf.append(cbuf, off, len); } /** * Write a string. */ public void write(String str) { buf.append(str); } /** * Write a portion of a string. * * @param str String to be written * @param off Offset from which to start writing characters * @param len Number of characters to write */ public void write(String str, int off, int len) { char cbuf[] = new char[len]; str.getChars(off, len, cbuf, 0); buf.append(cbuf); } /** * Return the buffer's current value as a string. */ public String toString() { return buf.toString(); } /** * Return the string buffer itself. */ public StringBuffer getBuffer() { return buf; } /** * Flush the stream. */ public void flush() { } /** * Close the stream. This method does not release the buffer, since its * contents might still be required. */ public void close() { } }
⏎ java/io/StringWriter.java
Â
⇒ Backup JDK 1.1 Installation Directory
⇠JDK 1.1 classes.zip - Java Core Classes
2018-11-17, 92059👍, 0💬
Popular Posts:
What is the sax\Counter.java provided in the Apache Xerces package? I have Apache Xerces 2.11.0 inst...
Apache Log4j provides the interface that applications should code to and provides the adapter compon...
JDK 11 jdk.hotspot.agent.jmod is the JMOD file for JDK 11 Hotspot Agent module. JDK 11 Hotspot Agent...
The Apache FontBox library is an open source Java tool to obtain low level information from font fil...
How to read XML document with DTD validation from socket connections with the socket\DelayedInput.ja.. .