20 *
21 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
22 * or visit www.oracle.com if you need additional information or have any
23 * questions.
24 */
25
26 package java.io;
27
28 /**
29 * This class allows an application to create an input stream in
30 * which the bytes read are supplied by the contents of a string.
31 * Applications can also read bytes from a byte array by using a
32 * <code>ByteArrayInputStream</code>.
33 * <p>
34 * Only the low eight bits of each character in the string are used by
35 * this class.
36 *
37 * @author Arthur van Hoff
38 * @see java.io.ByteArrayInputStream
39 * @see java.io.StringReader
40 * @since JDK1.0
41 * @deprecated This class does not properly convert characters into bytes. As
42 * of JDK 1.1, the preferred way to create a stream from a
43 * string is via the <code>StringReader</code> class.
44 */
45 @Deprecated
46 public
47 class StringBufferInputStream extends InputStream {
48 /**
49 * The string from which bytes are read.
50 */
51 protected String buffer;
52
53 /**
54 * The index of the next character to read from the input stream buffer.
55 *
56 * @see java.io.StringBufferInputStream#buffer
57 */
58 protected int pos;
59
60 /**
|
20 *
21 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
22 * or visit www.oracle.com if you need additional information or have any
23 * questions.
24 */
25
26 package java.io;
27
28 /**
29 * This class allows an application to create an input stream in
30 * which the bytes read are supplied by the contents of a string.
31 * Applications can also read bytes from a byte array by using a
32 * <code>ByteArrayInputStream</code>.
33 * <p>
34 * Only the low eight bits of each character in the string are used by
35 * this class.
36 *
37 * @author Arthur van Hoff
38 * @see java.io.ByteArrayInputStream
39 * @see java.io.StringReader
40 * @since 1.0
41 * @deprecated This class does not properly convert characters into bytes. As
42 * of JDK 1.1, the preferred way to create a stream from a
43 * string is via the <code>StringReader</code> class.
44 */
45 @Deprecated
46 public
47 class StringBufferInputStream extends InputStream {
48 /**
49 * The string from which bytes are read.
50 */
51 protected String buffer;
52
53 /**
54 * The index of the next character to read from the input stream buffer.
55 *
56 * @see java.io.StringBufferInputStream#buffer
57 */
58 protected int pos;
59
60 /**
|