@Test public void testRead() throws IOException { final Reader reader = new CharSequenceReader("Foo"); assertEquals('F', reader.read()); assertEquals('o', reader.read()); assertEquals('o', reader.read()); assertEquals(-1, reader.read()); assertEquals(-1, reader.read()); reader.close(); }
@Override public int read() { if (idx >= charSequence.length()) { return EOF; } else { return charSequence.charAt(idx++); } }
CharSequenceReader extends Reader implements Serializable { @Override public int read() { if (idx >= charSequence.length()) { return EOF; } else { return charSequence.charAt(idx++); } } }
CharSequenceReader extends Reader implements Serializable { @Override public int read() { if (idx >= charSequence.length()) { return EOF; } else { return charSequence.charAt(idx++); } } CharSequenceReader(final CharSequence charSequence); }
CharSequenceReader extends Reader implements Serializable { @Override public int read() { if (idx >= charSequence.length()) { return EOF; } else { return charSequence.charAt(idx++); } } CharSequenceReader(final CharSequence charSequence); @Override void close(); @Override void mark(final int readAheadLimit); @Override boolean markSupported(); @Override int read(); @Override int read(final char[] array, final int offset, final int length); @Override void reset(); @Override long skip(final long n); @Override String toString(); }
CharSequenceReader extends Reader implements Serializable { @Override public int read() { if (idx >= charSequence.length()) { return EOF; } else { return charSequence.charAt(idx++); } } CharSequenceReader(final CharSequence charSequence); @Override void close(); @Override void mark(final int readAheadLimit); @Override boolean markSupported(); @Override int read(); @Override int read(final char[] array, final int offset, final int length); @Override void reset(); @Override long skip(final long n); @Override String toString();  }