Changeset 119 for Include/Classes/System/IO
- Timestamp:
- Feb 23, 2007, 11:00:24 PM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
Include/Classes/System/IO/Stream.ab
r115 r119 1 2 #require <Classes/System/misc.ab> 1 3 2 4 Class Stream 3 Public 5 Public 'Protected 4 6 Sub Stream(): End Sub 5 7 Public 6 Virtual Function CanRead() As Boolean: End Function 7 Virtual Function CanSeek() As Boolean: End Function 8 Virtual Function CanTimeout() As Boolean: End Function 9 Virtual Function CanWrite() As Boolean: End Function 10 Virtual Function Length() As Int64: End Function 11 Virtual Sub Position(value As Int64): End Sub 12 Virtual Function Position() As Int64: End Function 13 Virtual Sub ReadTimeout(value As Long): End Sub 14 Virtual Function ReadTimeout() As Long: End Function 15 Virtual Sub WriteTimeout(value As Long): End Sub 16 Virtual Function WriteTimeout() As Long: End Function 8 Virtual Sub ~Stream() 9 Close() 10 End Sub 11 Public 12 Abstract Function CanRead() As Boolean 13 Abstract Function CanSeek() As Boolean 14 15 Virtual Function CanTimeout() As Boolean 16 Return True 17 End Function 18 19 Abstract Function CanWrite() As Boolean 20 Abstract Function Length() As Int64 21 Abstract Sub Position(value As Int64) 22 Abstract Function Position() As Int64 23 24 Virtual Sub ReadTimeout(value As Long) 25 ' Throw InvalidOperationException 26 End Sub 27 28 Virtual Function ReadTimeout() As Long 29 ' Throw InvalidOperationException 30 End Function 31 32 Virtual Sub WriteTimeout(value As Long) 33 ' Throw InvalidOperationException 34 End Sub 35 36 Virtual Function WriteTimeout() As Long 37 ' Throw InvalidOperationException 38 End Function 17 39 18 40 Public … … 22 44 Virtual Function EndRead(ByRef asyncResult As IAsyncResult) As Long: End Function 23 45 Virtual Sub EndWrite(ByRef asyncResult As IAsyncResult): End Sub 24 Virtual Sub Flush(): End Sub 25 Virtual Function Read(ByRef buffer[] As Byte, offset As Long, count As Long) As Long: End Function 26 Virtual Function ReadByte() As Long: End Function 27 Virtual Function Seek(offset As Int64, origin As SeekOrigin) As Long: End Function 28 Virtual Sub SetLength(value As Int64): End Sub 29 Virtual Sub Write (ByRef buffer[] As Byte, offset As Long, count As Long): End Sub 30 Virtual Sub WriteByte(value As Byte): End Sub 46 Abstract Sub Flush() 47 Abstract Function Read(ByRef buffer[] As Byte, offset As Long, count As Long) As Long 31 48 49 Virtual Function ReadByte() As Long 50 Dim b As Byte 51 Dim ret = Read(VarPtr(b), 0, 1) 52 If ret <> 0 Then 53 Return b 54 Else 55 Return -1 56 End If 57 End Function 58 59 Abstract Function Seek(offset As Int64, origin As SeekOrigin) As Long 60 Abstract Sub SetLength(value As Int64): End Sub 61 Abstract Sub Write(ByRef buffer[] As Byte, offset As Long, count As Long) 62 63 Virtual Sub WriteByte(b As Byte) 64 Write(VarPtr(b), 0, 1) 65 End Sub 32 66 Protected 33 67 Virtual Function CreateWaitHandle() As WaitHandle: End Function
Note:
See TracChangeset
for help on using the changeset viewer.