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
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addWriterListener
(WriterListener writerListener) Adds a writer listener to this writer that will be notified when new strings are sent.void
close()
void
flush()
void
removeWriterListener
(WriterListener writerListener) Removes a writer listener from this writer.void
write
(char[] cbuf) void
write
(char[] cbuf, int off, int len) void
write
(int c) void
void
Methods inherited from class java.io.Writer
append, append, append, nullWriter
-
Constructor Details
-
ObservableWriter
-
-
Method Details
-
write
- Specified by:
write
in classWriter
- Throws:
IOException
-
flush
- Specified by:
flush
in interfaceFlushable
- Specified by:
flush
in classWriter
- Throws:
IOException
-
close
- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
- Specified by:
close
in classWriter
- Throws:
IOException
-
write
- Overrides:
write
in classWriter
- Throws:
IOException
-
write
- Overrides:
write
in classWriter
- Throws:
IOException
-
write
- Overrides:
write
in classWriter
- Throws:
IOException
-
write
- Overrides:
write
in 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.
-