Java InputStream.markSupported()

Syntax

InputStream.markSupported() has the following syntax.

public boolean markSupported()

Example

In the following code shows how to use InputStream.markSupported() method.


/*from   w w w .ja v  a  2 s .c o  m*/
import java.io.FileInputStream;
import java.io.InputStream;

public class Main {
  public static void main(String[] args) throws Exception {

    // new input stream created
    InputStream is = new FileInputStream("C://test.txt");

    // returns true if the mark()/reset() supported.
    boolean bool = is.markSupported();
    is.close();
    System.out.print(bool);

  }
}