Example usage for java.io StringReader markSupported

List of usage examples for java.io StringReader markSupported

Introduction

In this page you can find the example usage for java.io StringReader markSupported.

Prototype

public boolean markSupported() 

Source Link

Document

Tells whether this stream supports the mark() operation, which it does.

Usage

From source file:Main.java

public static void main(String[] argv) throws IOException {
    StringReader stringReader = new StringReader("java2s.com");

    stringReader.mark(2);/*from  w ww.  j  a v  a  2s. co m*/

    System.out.println(stringReader.markSupported());

    System.out.println(stringReader.read());

    stringReader.reset();

    stringReader.close();
}