22.7
java.io.StringBufferInputStream
THE PACKAGE JAVA.IO
22.7 The Class
java.io.StringBufferInputStream
A
StringBufferInputStream
 contains an internal buffer that contains bytes that
may be read from the stream. An internal counter keeps track of the next byte to
be supplied by the
read
 method. See also
ByteArrayInputStream
 ( 22.6).
public class StringBufferInputStream extends InputStream {
protected String buffer;
protected int pos;
protected int count;
public StringBufferInputStream(String s)
throws NullPointerException;
public int read();
public int read(byte[] b, int off, int len)
throws NullPointerException, IndexOutOfBoundsException;
public long skip(long n);
public int available();
public void reset();
}
Note that bytes read from a
StringBufferInputStream
 are the low order
eight bits of each character in the string; the high order eight bits of each character
are ignored.
22.7.1
protected String buffer;
A
String
 that was provided by the creator of the stream. Elements
buffer[0]
through
buffer[count 1]
 are the only bytes that can ever be read from this
stream; element
buffer[pos]
 is the next byte to be read.
22.7.2
protected int pos;
This value should always be nonnegative and not larger than the value of
count
.
The next byte to be read from this stream will be
buffer[pos]
.
22.7.3
protected int count;
This value equals the length of
buffer
. It is the number of bytes of data in
buffer
 that can ever be read from this stream.
692






footer




 

 

 

 

 Home | About Us | Network | Services | Support | FAQ | Control Panel | Order Online | Sitemap | Contact

java hosting

 

Our partners: PHP: Hypertext Preprocessor Best Web Hosting Java Web Hosting Inexpensive Web Hosting  Jsp Web Hosting

Cheapest Web Hosting Jsp Hosting Cheap Hosting

Visionwebhosting.net Business web hosting division of Web Design Plus. All rights reserved