You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: Foundation/Stream.swift
+44-11Lines changed: 44 additions & 11 deletions
Original file line number
Diff line number
Diff line change
@@ -62,7 +62,9 @@ extension Stream {
62
62
openclassStream:NSObject{
63
63
64
64
publicoverrideinit(){
65
-
65
+
iftype(of:self)==Stream.self {
66
+
NSRequiresConcreteImplementation()
67
+
}
66
68
}
67
69
68
70
openfunc open(){
@@ -77,21 +79,19 @@ open class Stream: NSObject {
77
79
// By default, a stream is its own delegate, and subclassers of InputStream and OutputStream must maintain this contract. [someStream setDelegate:nil] must restore this behavior. As usual, delegates are not retained.
// OutputStream is an abstract class representing the base functionality of a write stream.
165
185
// Subclassers are required to implement these methods.
166
186
// Currently this is left as named OutputStream due to conflicts with the standard library's text streaming target protocol named OutputStream (which ideally should be renamed)
167
187
openclassOutputStream:Stream{
168
188
169
-
privatevar_stream:CFWriteStream!
189
+
privatevar_stream:CFWriteStream!
170
190
171
191
// writes the bytes from the specified buffer to the stream up to len bytes. Returns the number of bytes actually written.
0 commit comments