7.2 The InputStream class 

Previous Index Next 


The InputStream class is an abstract class from which all input streams inherit. It has several methods that are common to all input streams. These methods are:
 
 
available Returns the number of bytes that can be read from this input stream without blocking. 
close Closes this input stream and releases any system resources associated with the stream.
mark Marks the current position in this input stream. This position can be returned to by calling reset.
markSupported Returns true if this input stream supports the mark and reset methods.
read Reads the next byte of data from this input stream. This method is overloaded so that an array of bytes can also be read.
reset Repositions this stream to the position at the time the mark method was last called on this input stream.
skip Skips over and discards n bytes of data from this input stream. 
 
Some of the sub-classes of InputStream are:  


Source