Name
java.io.InputStream
Synopsis
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; }
Get Wireless Java now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.