Java PushbackReader Class

Java PushbackReader class is a character stream reader. It is used to pushes back a character into stream and overrides the FilterReader class.

Class declaration

public class PushbackReader extends FilterReader

Methods of PrintWriter class

  1. int read()

    It is used to read a single character.

  2. void mark(int readAheadLimit)

    It is used to mark the present position in a stream.

  3. boolean ready()

    It is used to tell whether the stream is ready to be read.

  4. boolean markSupported()

    It is used to tell whether the stream supports mark() operation.

  5. void unread(byte[] b)

    It is used to pushes back the character by copying it to the pushback buffer.

  6. void reset()

    It is used to reset the stream.


Example :

Flash Soon


Output:



Advertisement

© Sapster 2017