org.jivesoftware.smack.util
Class ObservableReader
java.lang.Object
java.io.Reader
org.jivesoftware.smack.util.ObservableReader
- All Implemented Interfaces:
- Closeable, Readable
public class ObservableReader
- extends Reader
An ObservableReader is a wrapper on a Reader that notifies to its listeners when
reading character streams.
- Author:
- Gaston Dombiak
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ObservableReader
public ObservableReader(Reader wrappedReader)
read
public int read(char[] cbuf,
int off,
int len)
throws IOException
- Specified by:
read
in class Reader
- Throws:
IOException
close
public void close()
throws IOException
- Specified by:
close
in interface Closeable
- Specified by:
close
in class Reader
- Throws:
IOException
read
public int read()
throws IOException
- Overrides:
read
in class Reader
- Throws:
IOException
read
public int read(char[] cbuf)
throws IOException
- Overrides:
read
in class Reader
- Throws:
IOException
skip
public long skip(long n)
throws IOException
- Overrides:
skip
in class Reader
- Throws:
IOException
ready
public boolean ready()
throws IOException
- Overrides:
ready
in class Reader
- Throws:
IOException
markSupported
public boolean markSupported()
- Overrides:
markSupported
in class Reader
mark
public void mark(int readAheadLimit)
throws IOException
- Overrides:
mark
in class Reader
- Throws:
IOException
reset
public void reset()
throws IOException
- Overrides:
reset
in class Reader
- Throws:
IOException
addReaderListener
public void addReaderListener(ReaderListener readerListener)
- Adds a reader listener to this reader that will be notified when
new strings are read.
- Parameters:
readerListener
- a reader listener.
removeReaderListener
public void removeReaderListener(ReaderListener readerListener)
- Removes a reader listener from this reader.
- Parameters:
readerListener
- a reader listener.
Copyright © 2003-2007 Jive Software.