[271] | 1 | Namespace System
|
---|
| 2 | Namespace IO
|
---|
[111] | 3 |
|
---|
[271] | 4 |
|
---|
[112] | 5 | Class Stream
|
---|
[381] | 6 | Implements System.IDisposable
|
---|
[347] | 7 |
|
---|
[119] | 8 | Public 'Protected
|
---|
[468] | 9 | Sub Stream()
|
---|
| 10 | End Sub
|
---|
[114] | 11 | Public
|
---|
[119] | 12 | Virtual Sub ~Stream()
|
---|
[388] | 13 | This.Dispose(False)
|
---|
[119] | 14 | End Sub
|
---|
| 15 | Public
|
---|
| 16 | Abstract Function CanRead() As Boolean
|
---|
| 17 | Abstract Function CanSeek() As Boolean
|
---|
[111] | 18 |
|
---|
[119] | 19 | Virtual Function CanTimeout() As Boolean
|
---|
| 20 | Return True
|
---|
| 21 | End Function
|
---|
| 22 |
|
---|
| 23 | Abstract Function CanWrite() As Boolean
|
---|
| 24 | Abstract Function Length() As Int64
|
---|
| 25 | Abstract Sub Position(value As Int64)
|
---|
| 26 | Abstract Function Position() As Int64
|
---|
| 27 |
|
---|
| 28 | Virtual Sub ReadTimeout(value As Long)
|
---|
| 29 | ' Throw InvalidOperationException
|
---|
| 30 | End Sub
|
---|
| 31 |
|
---|
| 32 | Virtual Function ReadTimeout() As Long
|
---|
| 33 | ' Throw InvalidOperationException
|
---|
| 34 | End Function
|
---|
| 35 |
|
---|
| 36 | Virtual Sub WriteTimeout(value As Long)
|
---|
| 37 | ' Throw InvalidOperationException
|
---|
| 38 | End Sub
|
---|
| 39 |
|
---|
| 40 | Virtual Function WriteTimeout() As Long
|
---|
| 41 | ' Throw InvalidOperationException
|
---|
| 42 | End Function
|
---|
| 43 |
|
---|
[112] | 44 | Public
|
---|
[347] | 45 | Virtual Function BeginRead(buffer As *Byte, offset As Long, count As Long, callback As AsyncCallback, state As Object) As System.IAsyncResult
|
---|
| 46 | Read(buffer,offset,count)
|
---|
| 47 | End Function
|
---|
| 48 | Virtual Function BeginWrite(buffer As *Byte, offset As Long, count As Long, callback As AsyncCallback, state As Object) As System.IAsyncResult
|
---|
| 49 | Write(buffer,offset,count)
|
---|
| 50 | End Function
|
---|
[432] | 51 | Sub Close()
|
---|
[388] | 52 | Dispose(True)
|
---|
[347] | 53 | End Sub
|
---|
[432] | 54 | Sub Dispose()
|
---|
[388] | 55 | Dispose(True)
|
---|
| 56 | End Sub
|
---|
[568] | 57 | Virtual Function EndRead(asyncResult As System.IAsyncResult) As Long
|
---|
[468] | 58 | End Function
|
---|
[568] | 59 | Virtual Sub EndWrite(asyncResult As System.IAsyncResult)
|
---|
[468] | 60 | End Sub
|
---|
[119] | 61 | Abstract Sub Flush()
|
---|
[337] | 62 | Abstract Function Read(buffer As *Byte, offset As Long, count As Long) As Long
|
---|
[112] | 63 |
|
---|
[119] | 64 | Virtual Function ReadByte() As Long
|
---|
| 65 | Dim b As Byte
|
---|
[337] | 66 | Dim ret = Read(VarPtr(b), 0, 1)
|
---|
[119] | 67 | If ret <> 0 Then
|
---|
| 68 | Return b
|
---|
| 69 | Else
|
---|
| 70 | Return -1
|
---|
| 71 | End If
|
---|
| 72 | End Function
|
---|
| 73 |
|
---|
[391] | 74 | Abstract Function Seek(offset As Int64, origin As SeekOrigin) As Int64
|
---|
[248] | 75 | Abstract Sub SetLength(value As Int64)
|
---|
[337] | 76 | Abstract Sub Write(buffer As *Byte, offset As Long, count As Long)
|
---|
[119] | 77 | Virtual Sub WriteByte(b As Byte)
|
---|
[337] | 78 | Write(VarPtr(b), 0, 1)
|
---|
[119] | 79 | End Sub
|
---|
[112] | 80 | Protected
|
---|
[432] | 81 | Virtual Sub Dispose(disposing As Boolean)
|
---|
| 82 | End Sub
|
---|
| 83 | Virtual Function CreateWaitHandle() As System.Threading.WaitHandle
|
---|
| 84 | End Function
|
---|
[112] | 85 | End Class
|
---|
[271] | 86 |
|
---|
| 87 |
|
---|
| 88 | End Namespace
|
---|
| 89 | End Namespace
|
---|