Example usage for java.io FilterReader ready

List of usage examples for java.io FilterReader ready

Introduction

In this page you can find the example usage for java.io FilterReader ready.

Prototype

public boolean ready() throws IOException 

Source Link

Document

Tells whether this stream is ready to be read.

Usage

From source file:Main.java

public static void main(String[] args) throws Exception {

    Reader r = new StringReader("ABCDEF");

    // create new filter reader
    FilterReader fr = new FilterReader(r) {
    };/*from  w w  w.  j a  v  a2 s.c o m*/

    // true if the filter reader is ready to be read
    boolean bool = fr.ready();

    // prints
    System.out.println("Ready to read? " + bool);

}