CharArrayReader markSupported() method in Java with Examples Last Updated : 13 Feb, 2019 Comments Improve Suggest changes Like Article Like Report 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 parameters Return Value: This method returns a boolean value which tells if this CharArrayReader supports mark() operation or not. It return true if it is markSupported. Else it returns false. Below methods illustrates the working of markSupported() method: Program 1: Java // Java program to demonstrate // CharArrayReader markSupported() method import java.io.*; import java.util.*; class GFG { public static void main(String[] args) { try { char[] str = { 'G', 'e', 'e', 'k', 's', 'F', 'o', 'r', 'G', 'e', 'e', 'k', 's' }; // Create a CharArrayReader instance CharArrayReader reader = new CharArrayReader(str); // Check if the CharArrayReader is // markSupported using markSupported() System.out.println("Is CharArrayReader markSupported: " + reader.markSupported()); reader.close(); } catch (Exception e) { System.out.println(e); } } } Output: Is CharArrayReader markSupported: true Program 2: Java // Java program to demonstrate // CharArrayReader markSupported() method import java.io.*; import java.util.*; class GFG { public static void main(String[] args) { try { char[] str = { 'G', 'E', 'E', 'K', 'S' }; // Create a CharArrayReader instance CharArrayReader reader = new CharArrayReader(str); // Check if the CharArrayReader is // markSupported using markSupported() System.out.println("Is CharArrayReader markSupported: " + reader.markSupported()); reader.close(); } catch (Exception e) { System.out.println(e); } } } Output: Is CharArrayReader markSupported: true Reference: https://docs.oracle.com/javase/9/docs/api/java/io/CharArrayReader.html#markSupported-- Comment More infoAdvertise with us Next Article CharArrayReader markSupported() method in Java with Examples C code_r Follow Improve Article Tags : Java Java-Functions Java-IO package Java-CharArrayReader Practice Tags : Java Similar Reads CharArrayReader mark(int) method in Java with Examples The mark() method of CharArrayReader Class in Java is used to mark the stream as the checkpoint from where the stream read will start, once reset() is called. This method is not supported by all subclasses of CharArrayReader class. Syntax: public void mark(int readAheadLimit) Parameters: This method 3 min read BufferedReader markSupported() method in Java with Examples 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 markSuppor 2 min read ByteArrayInputStream markSupported() method in Java with Examples The markSupported() method is a built-in method of the Java.io.ByteArrayInputStream method tests if this input stream supports the mark and reset methods. The markSupported method of ByteArrayInputStreamInputStream returns true always Syntax: public boolean markSupported() Parameters: The function d 2 min read CharArrayReader read() method in Java with Examples The read() method of CharArrayReader Class in Java is used to read a single character from the stream. This method blocks the stream till: It has taken some input from the stream. Some IOException has occurred It has reached the end of the stream while reading. This method is declared as abstract me 3 min read CharArrayReader skip(long) method in Java with Examples The skip(long) method of CharArrayReader Class in Java is used to skip the specified number of characters on the stream. This number of characters is specified as the parameter. If it reaches the end of the stream by skipping, it will block the stream till it gets some characters, or throw IOExcepti 3 min read Like