The Wayback Machine - https://web.archive.org/web/20211011042618/https://www.geeksforgeeks.org/java-io-inputstream-class-in-java/amp/

Java.io.InputStream Class in Java

InputStream class is the superclass of all the io classes i.e. representing an input stream of bytes. It represents input stream of bytes. Applications that are defining subclass of InputStream must provide method, returning the next byte of input.
A reset() method is invoked which re-positions the stream to the recently marked position.


Declaration :

public abstract class InputStream
   extends Object
      implements Closeable

Constructor :

Attention reader! Don’t stop learning now. Get hold of all the important Java Foundation and Collections concepts with the Fundamentals of Java and Java Collections Course at a student-friendly price and become industry ready. To complete your preparation from learning a language to DS Algo and many more,  please refer Complete Interview Preparation Course.

Methods:

HelloGeeks

Output :

Char : H
Char : e
Char : l
skip() method comes to play
mark() method comes to play
Char : o
Char : G
Char : e
reset() method not supported.
geek.markSupported() supported reset() : false

This article is contributed by Mohit Gupta 🙂. If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to contribute@geeksforgeeks.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.

Please write comments if you find anything incorrect, or you want to share more information about the topic discussed above.


Article Tags :
Practice Tags :