Smack

org.jivesoftware.smack.util
Class ObservableReader

java.lang.Object
  extended byjava.io.Reader
      extended byorg.jivesoftware.smack.util.ObservableReader

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

Field Summary
 
Fields inherited from class java.io.Reader
lock
 
Constructor Summary
ObservableReader(Reader wrappedReader)
           
 
Method Summary
 void addReaderListener(ReaderListener readerListener)
          Adds a reader listener to this reader that will be notified when new strings are read.
 void close()
           
 void mark(int readAheadLimit)
           
 boolean markSupported()
           
 int read()
           
 int read(char[] cbuf)
           
 int read(char[] cbuf, int off, int len)
           
 boolean ready()
           
 void removeReaderListener(ReaderListener readerListener)
          Removes a reader listener from this reader.
 void reset()
           
 long skip(long n)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ObservableReader

public ObservableReader(Reader wrappedReader)
Method Detail

read

public int read(char[] cbuf,
                int off,
                int len)
         throws IOException
Throws:
IOException

close

public void close()
           throws IOException
Throws:
IOException

read

public int read()
         throws IOException
Throws:
IOException

read

public int read(char[] cbuf)
         throws IOException
Throws:
IOException

skip

public long skip(long n)
          throws IOException
Throws:
IOException

ready

public boolean ready()
              throws IOException
Throws:
IOException

markSupported

public boolean markSupported()

mark

public void mark(int readAheadLimit)
          throws IOException
Throws:
IOException

reset

public void reset()
           throws IOException
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.

Smack

Copyright © 2003 Jive Software.