The close() method of PushbackInputStream class in Java is used to closes the input stream and it releases resources of system that are associated with the stream. After calling this method, further calling other method if this class will throw the IOException.
public void close()
Specified By: This method is specified by the close() method AutoCloseable interface and the close() method of Closeable interface.
Overrides: This method overrides the close() method of FilterInputStream class.
Parameters: This method does not accept any parameter.
Return value: This method does not return any value.
Exceptions: This method throws IOException if an I/O error occurs.
Below programs illustrate close() method of PushbackInputStream class in IO package:
Please Login to comment...