Java tutorial
import java.io.FilterReader; import java.io.Reader; import java.io.StringReader; public class Main { public static void main(String[] args) throws Exception { Reader r = new StringReader("ABCDEF"); // create new filter reader FilterReader fr = new FilterReader(r) { }; // true if the filter reader is ready to be read boolean bool = fr.ready(); // prints System.out.println("Ready to read? " + bool); } }