Package org.jivesoftware.smack.util
Class ObservableWriter
java.lang.Object
java.io.Writer
org.jivesoftware.smack.util.ObservableWriter
- All Implemented Interfaces:
Closeable,Flushable,Appendable,AutoCloseable
An ObservableWriter is a wrapper on a Writer that notifies to its listeners when
writing to character streams.
-
Field Summary
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddWriterListener(WriterListener writerListener) Adds a writer listener to this writer that will be notified when new strings are sent.voidclose()voidflush()voidremoveWriterListener(WriterListener writerListener) Removes a writer listener from this writer.voidwrite(char[] cbuf) voidwrite(char[] cbuf, int off, int len) voidwrite(int c) voidvoidMethods inherited from class java.io.Writer
append, append, append, nullWriter
-
Constructor Details
-
ObservableWriter
-
-
Method Details
-
write
- Specified by:
writein classWriter- Throws:
IOException
-
flush
- Specified by:
flushin interfaceFlushable- Specified by:
flushin classWriter- Throws:
IOException
-
close
- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Specified by:
closein classWriter- Throws:
IOException
-
write
- Overrides:
writein classWriter- Throws:
IOException
-
write
- Overrides:
writein classWriter- Throws:
IOException
-
write
- Overrides:
writein classWriter- Throws:
IOException
-
write
- Overrides:
writein classWriter- Throws:
IOException
-
addWriterListener
Adds a writer listener to this writer that will be notified when new strings are sent.- Parameters:
writerListener- a writer listener.
-
removeWriterListener
Removes a writer listener from this writer.- Parameters:
writerListener- a writer listener.
-