January 2002
Intermediate to advanced
264 pages
8h 3m
English
java.io.InputStream
This abstract class is identical to the J2SE
InputStream class. All input streams must extend
this class. Applications that define a subclass of
InputStream must always implement the abstract
read() method, which reads in a single byte of
data or -1 if there is no more data to be read.
Other important methods include available(), which
returns the number of available bytes that can be read without
blocking, as well as skip(), which skips over the
specified number of bytes. Finally, close() will
close the input stream, releasing any resources associated with it.
public abstract classInputStream{ // constructor publicInputStream(); // public instance methods public intavailable() throws java.io.IOException; public voidclose(); public synchronized voidmark(int readlimit); public booleanmarkSupported(); public abstract intread() throws java.io.IOException; public intread(byte[] b) throws java.io.IOException; public intread(byte[] b, int off, int len) throws java.io.IOException; public synchronized voidreset() throws java.io.IOException; public longskip(long n) throws java.io.IOException; }
Read now
Unlock full access