BufferedReader markSupported() method in Java with Examples Last Updated : 05 Jun, 2020 Comments Improve Suggest changes Like Article Like Report The markSupported() method of BufferedReader class in Java is used to verify whether the stream supports the mark() method or not. It returns the boolean value true if the stream supports mark() otherwise it returns false. Syntax: public boolean markSupported() Overrides: It overrides the markSupported() method of the Reader class. Parameters: This method does not accept any parameter. Return value: This method returns a boolean value indicating the supportability of the mark() method by the stream. Exceptions: This method does not throw any exception. Below programs illustrate markSupported() method in BufferedReader class in IO package: Program 1: Assume the existence of the file "c:/demo.txt". Java // Java program to illustrate // BufferedReader markSupported() method import java.io.*; public class GFG { public static void main(String[] args) { // Read the stream 'demo.txt' // for containing text "GEEKS" FileReader fileReader = new FileReader( "c:/demo.txt"); // Convert fileReader to // bufferedReader BufferedReader buffReader = new BufferedReader( fileReader); // Returns true if stream // supports mark() boolean bool = buffReader.markSupported(); System.out.println( "Support for mark() : " + bool); } } Output: Supports for mark() : true Program 2: Assume the existence of the file "c:/demo.txt". Java // Java program to illustrate // BufferedReader markSupported() method import java.io.*; public class GFG { public static void main(String[] args) { // Read the stream 'demo.txt' // for containing text "GEEKS" FileReader fileReader = new FileReader( "c:/demo.txt"); // Convert fileReader to // bufferedReader BufferedReader buffReader = new BufferedReader( fileReader); // Returns true if stream // supports mark() boolean bool = buffReader.markSupported(); System.out.println( "Support for mark() : " + bool); } } Output: Supports for mark() : false References: https://docs.oracle.com/javase/10/docs/api/java/io/BufferedReader.html#markSupported() Comment More infoAdvertise with us Next Article CharArrayReader markSupported() method in Java with Examples P pp_pankaj Follow Improve Article Tags : Java Java-Functions Java-IO package Practice Tags : Java Similar Reads BufferedInputStream markSupported() method in Java with Examples The markSupported() method of BufferedInputStream class in Java is used to verify whether the input stream supports the mark and reset method or not. If any of the two methods is not supported by the input stream then the program will return false else true. Syntax: public boolean markSupported() Pa 2 min read BufferedReader mark() method in Java with Examples The mark() method of BufferedReader class in Java is used to mark the current position in the buffer reader stream. The reset() method of the same BufferedReader class is also called subsequently, after the mark() method is called. The reset() method fixes the position at the last marked position so 3 min read CharArrayReader markSupported() method in Java with Examples The markSupported() method of CharArrayReader Class in Java is used to check whether this CharArrayReader is supports mark() operation or not. It returns a boolean which states if the reader is mark supported. Syntax: public boolean markSupported() Parameters: This method does not accepts any parame 2 min read CharArrayReader markSupported() method in Java with Examples The markSupported() method of CharArrayReader Class in Java is used to check whether this CharArrayReader is supports mark() operation or not. It returns a boolean which states if the reader is mark supported. Syntax: public boolean markSupported() Parameters: This method does not accepts any parame 2 min read CharArrayReader markSupported() method in Java with Examples The markSupported() method of CharArrayReader Class in Java is used to check whether this CharArrayReader is supports mark() operation or not. It returns a boolean which states if the reader is mark supported. Syntax: public boolean markSupported() Parameters: This method does not accepts any parame 2 min read Buffer mark() methods in Java with Examples The mark() method of java.nio.Buffer Class is used to set this buffer's mark at its position.Syntax: public Buffer mark() Return Value: This method returns this buffer.Below are the examples to illustrate the mark() method:Examples 1: Java // Java program to demonstrate // mark() method import java. 2 min read Like