Java FilterReader.markSupported()
Syntax
FilterReader.markSupported() has the following syntax.
public boolean markSupported()
Example
In the following code shows how to use FilterReader.markSupported() method.
import java.io.FilterReader;
import java.io.Reader;
import java.io.StringReader;
/*from w ww. jav a2s . c o m*/
public class Main {
public static void main(String[] args) throws Exception {
// create new reader
Reader r = new StringReader("ABCDEF");
// create new filter reader
FilterReader fr = new FilterReader(r) {
};
// tests if the filter reader supports mark()
boolean bool = fr.markSupported();
// prints
System.out.print("If mark() supported? " + bool);
}
}
The code above generates the following result.
Home »
Java Tutorial »
java.io »
Java Tutorial »
java.io »