This class is a subclass of InputStream in which input bytes come from the characters of a specified String object. This class does not correctly convert the characters of a StringBuffer into bytes and is deprecated as of Java 1.1. Use StringReader instead to convert characters into bytes or use ByteArrayInputStream to read bytes from an array of bytes. Figure 9-58. java.io.StringBufferInputStreampublic class StringBufferInputStream extends InputStream { // Public Constructors public StringBufferInputStream (String s ); // Public Methods Overriding InputStream public int available ( ); synchronized public int read ( ); synchronized public int read (byte[ ] b , int off , int len ); synchronized public void reset ( ); synchronized public long skip (long n ); synchronized // Protected Instance Fields protected String buffer ; protected int count ; protected int pos ; } |