update NOTICE and LICENSE
[nit.git] / lib / filter_stream.nit
index 999f12c..66366c6 100644 (file)
@@ -12,7 +12,7 @@
 # another product.
 
 class FilterIStream
-special IStream
+       super IStream
        # Filter readed elements
        readable var _stream: nullable IStream
 
@@ -29,7 +29,7 @@ special IStream
 end
 
 class FilterOStream
-special OStream
+       super OStream
        # Filter outputed elements
        readable var _stream: nullable OStream
 
@@ -47,7 +47,7 @@ special OStream
 end
 
 class StreamCat
-special FilterIStream
+       super FilterIStream
        var _streams: Iterator[IStream]
 
        redef fun eof: Bool
@@ -98,7 +98,7 @@ special FilterIStream
 end
 
 class StreamDemux
-special FilterOStream
+       super FilterOStream
        var _streams: Array[OStream]
 
        redef fun is_writable: Bool
@@ -127,6 +127,15 @@ special FilterOStream
                end
        end
 
+       redef fun close
+       do
+               for i in _streams
+               do
+                       stream = i
+                       stream.close
+               end
+       end
+
        init with_streams(streams: Array[OStream])
        do
                _streams = streams