Package com.powsybl.commons.datasource
Class ObservableOutputStream
- java.lang.Object
-
- java.io.OutputStream
-
- com.powsybl.commons.io.ForwardingOutputStream<OutputStream>
-
- com.powsybl.commons.datasource.ObservableOutputStream
-
- All Implemented Interfaces:
Closeable
,Flushable
,AutoCloseable
public class ObservableOutputStream extends ForwardingOutputStream<OutputStream>
An output stream wrapper that allows notification when the stream is opened and closed.- Author:
- Geoffroy Jamgotchian
-
-
Field Summary
-
Fields inherited from class com.powsybl.commons.io.ForwardingOutputStream
os
-
-
Constructor Summary
Constructors Constructor Description ObservableOutputStream(OutputStream os, String streamName, DataSourceObserver observer)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
close()
-
Methods inherited from class com.powsybl.commons.io.ForwardingOutputStream
flush, write, write, write
-
Methods inherited from class java.io.OutputStream
nullOutputStream
-
-
-
-
Constructor Detail
-
ObservableOutputStream
public ObservableOutputStream(OutputStream os, String streamName, DataSourceObserver observer)
-
-
Method Detail
-
close
public void close() throws IOException
- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
- Overrides:
close
in classForwardingOutputStream<OutputStream>
- Throws:
IOException
-
-