< prev index next >

src/java.base/share/classes/java/io/Reader.java

Print this page

        

*** 61,77 **** * {@code close()} method. Subsequent calls to {@code close()} have no * effect. * * <p> While the stream is open, the {@code read()}, {@code read(char[])}, * {@code read(char[], int, int)}, {@code read(Charbuffer)}, {@code ! * ready())}, {@code skip(long)}, and {@code transferTo()} methods all * behave as if end of stream has been reached. After the stream has been * closed, these methods all throw {@code IOException}. * * <p> The {@code markSupported()} method returns {@code false}. The ! * {@code mark()} method does nothing, and the {@code reset()} method ! * throws {@code IOException}. * * <p> The {@link #lock object} used to synchronize operations on the * returned {@code Reader} is not specified. * * @return a {@code Reader} which reads no characters --- 61,76 ---- * {@code close()} method. Subsequent calls to {@code close()} have no * effect. * * <p> While the stream is open, the {@code read()}, {@code read(char[])}, * {@code read(char[], int, int)}, {@code read(Charbuffer)}, {@code ! * ready()}, {@code skip(long)}, and {@code transferTo()} methods all * behave as if end of stream has been reached. After the stream has been * closed, these methods all throw {@code IOException}. * * <p> The {@code markSupported()} method returns {@code false}. The ! * {@code mark()} and {@code reset()} methods throw an {@code IOException}. * * <p> The {@link #lock object} used to synchronize operations on the * returned {@code Reader} is not specified. * * @return a {@code Reader} which reads no characters
*** 113,122 **** --- 112,127 ---- } return 0; } @Override + public boolean ready() throws IOException { + ensureOpen(); + return false; + } + + @Override public long skip(long n) throws IOException { ensureOpen(); return 0L; }
< prev index next >