org.compass.core.util.reader
Class StringReader
java.lang.Object
java.io.Reader
org.compass.core.util.reader.StringReader
- All Implemented Interfaces:
- Closeable, Readable, RepeatableReader
public class StringReader
- extends Reader
- implements RepeatableReader
A character stream whose source is a string. Allows for
repeatable reads from the same string.
Note, this is an unsafe reader in terms of IndexOutOfBoundsException.
- Author:
- kimchy
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
StringReader
public StringReader(String s)
read
public int read()
- Overrides:
read in class Reader
read
public int read(char[] cbuf,
int off,
int len)
- Specified by:
read in class Reader
skip
public long skip(long ns)
- Overrides:
skip in class Reader
ready
public boolean ready()
- Overrides:
ready in class Reader
markSupported
public boolean markSupported()
- Overrides:
markSupported in class Reader
mark
public void mark(int readAheadLimit)
- Overrides:
mark in class Reader
reset
public void reset()
- Overrides:
reset in class Reader
close
public void close()
- Specified by:
close in interface Closeable- Specified by:
close in class Reader
Copyright (c) 2004-2008 The Compass Project.