Java tutorial
import java.io.BufferedInputStream; import java.io.FileInputStream; import java.io.InputStream; public class Main { public static void main(String[] args) throws Exception { boolean bool = false; InputStream inStream = new FileInputStream("c:/test.txt"); // input stream is converted to buffered input stream BufferedInputStream bis = new BufferedInputStream(inStream); // returns true if mark() and read() supports bool = bis.markSupported(); System.out.println("Support for mark() and reset() : " + bool); } }