     override final func writeImpl(_ bytes: ArraySlice<UInt8>) {
         contents += bytes
     }
+
+    override final func closeImpl() throws {
+        // Do nothing. The protocol does not require to stop receiving writes, close only signals that resources could
+        // be released at this point should we need to.
+    }
 }
 
 /// Represents a stream which is backed to a file. Not for instantiating.
 public class FileOutputByteStream: _WritableByteStreamBase {
 
+    public override final func closeImpl() throws {
+        flush()
+        try fileCloseImpl()
+    }
+
     /// Closes the file flushing any buffered data.
-    public final func close() throws {
-        flush()
-        try closeImpl()
-    }
-
-    func closeImpl() throws {
-        fatalError("closeImpl() should be implemented by a subclass")
+    func fileCloseImpl() throws {
+        fatalError("fileCloseImpl() should be implemented by a subclass")
     }
 }
 

        // Do nothing.
    }

    @usableFromInline func writeImpl<C: Collection>(_ bytes: C) where C.Iterator.Element == UInt8 {
        fatalError("Subclasses must implement this")
    }

        fflush(filePointer)
    }

    override final func fileCloseImpl() throws {
        defer {
            fclose(filePointer)
            // If clients called close we shouldn't call fclose again in deinit.
