Java FilterInputStream .markSupported ()
Syntax
FilterInputStream.markSupported() has the following syntax.
public boolean markSupported()
Example
In the following code shows how to use FilterInputStream.markSupported() method.
import java.io.BufferedInputStream;
import java.io.FileInputStream;
import java.io.FilterInputStream;
import java.io.InputStream;
/* w ww. j a v a 2 s .c om*/
public class Main {
public static void main(String[] args) throws Exception {
boolean bool = false;
// create input streams
InputStream is = new FileInputStream("C://test.txt");
FilterInputStream fis = new BufferedInputStream(is);
// tests if the input stream supports mark() and reset()
bool = fis.markSupported();
// prints
System.out.print("Supports mark and reset methods: " + bool);
}
}
Home »
Java Tutorial »
java.io »
Java Tutorial »
java.io »