Java PushbackInputStream Class

Java PrintWriter class is the implementation of Writer class. It is used to print the formatted representation of objects to the text-output stream.

Class declaration

public class PushbackInputStream extends FilterInputStream

Methods of PrintWriter class

  1. int available()

    It is used to return the number of bytes that can be read from the input stream.

  2. int read()

    It is used to read the next byte of data from the input stream

  3. boolean markSupported()

  4. void mark(int readlimit)

    It is used to mark the current position in the input stream.

  5. long skip(long x)

    It is used to skip over and discard x bytes of data.

  6. void unread(int b)

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

  7. void unread(byte[] b)

    It is used to pushes back the array of byte by copying it to the pushback buffer.

  8. void reset()

    It is used to reset the input stream.

  9. void close()

    It is used to close the input stream.


Example :

Flash Soon


Output:



Advertisement

© Sapster 2017