Java in a Nutshell, 5th Edition [Electronic resources]

نسخه متنی -صفحه : 1191/ 109
نمايش فراداده

This class is a FilterInputStream that provides input data buffering; efficiency is increased by reading in a large amount of data and storing it in an internal buffer. When data is requested, it is usually available from the buffer. Thus, most calls to read data do not actually have to read data from a disk, network, or other slow source. Create a BufferedInputStream by specifying the InputStream that is to be buffered in the call to the constructor. See also BufferedReader.

Figure 9-1. java.io.BufferedInputStream

public class 

BufferedInputStream extends FilterInputStream { // Public Constructors public

BufferedInputStream (InputStream

in ); public

BufferedInputStream (InputStream

in , int

size ); // Public Methods Overriding FilterInputStream public int

available ( ) throws IOException; synchronized

1.2 public void

close ( ) throws IOException; public void

mark (int

readlimit ); synchronized public boolean

markSupported ( ); constant public int

read ( ) throws IOException; synchronized public int

read (byte[ ]

b , int

off , int

len ) throws IOException; synchronized public void

reset ( ) throws IOException; synchronized public long

skip (long

n ) throws IOException; synchronized // Protected Instance Fields protected volatile byte[ ]

buf ; protected int

count ; protected int

marklimit ; protected int

markpos ; protected int

pos ; }