[111] | 1 |
|
---|
[112] | 2 | Class Stream
|
---|
[119] | 3 | Public 'Protected
|
---|
[115] | 4 | Sub Stream(): End Sub
|
---|
[114] | 5 | Public
|
---|
[119] | 6 | Virtual Sub ~Stream()
|
---|
[248] | 7 | This.Close()
|
---|
[119] | 8 | End Sub
|
---|
| 9 | Public
|
---|
| 10 | Abstract Function CanRead() As Boolean
|
---|
| 11 | Abstract Function CanSeek() As Boolean
|
---|
[111] | 12 |
|
---|
[119] | 13 | Virtual Function CanTimeout() As Boolean
|
---|
| 14 | Return True
|
---|
| 15 | End Function
|
---|
| 16 |
|
---|
| 17 | Abstract Function CanWrite() As Boolean
|
---|
| 18 | Abstract Function Length() As Int64
|
---|
| 19 | Abstract Sub Position(value As Int64)
|
---|
| 20 | Abstract Function Position() As Int64
|
---|
| 21 |
|
---|
| 22 | Virtual Sub ReadTimeout(value As Long)
|
---|
| 23 | ' Throw InvalidOperationException
|
---|
| 24 | End Sub
|
---|
| 25 |
|
---|
| 26 | Virtual Function ReadTimeout() As Long
|
---|
| 27 | ' Throw InvalidOperationException
|
---|
| 28 | End Function
|
---|
| 29 |
|
---|
| 30 | Virtual Sub WriteTimeout(value As Long)
|
---|
| 31 | ' Throw InvalidOperationException
|
---|
| 32 | End Sub
|
---|
| 33 |
|
---|
| 34 | Virtual Function WriteTimeout() As Long
|
---|
| 35 | ' Throw InvalidOperationException
|
---|
| 36 | End Function
|
---|
| 37 |
|
---|
[112] | 38 | Public
|
---|
[262] | 39 | Virtual Function BeginRead(ByRef buffer[] As Byte, offset As Long, count As Long, callback As AsyncCallback, state As Object) As System.IAsyncResult: End Function
|
---|
| 40 | Virtual Function BeginWrite(ByRef buffer[] As Byte, offset As Long, count As Long, callback As AsyncCallback, state As Object) As System.IAsyncResult: End Function
|
---|
[112] | 41 | Virtual Sub Close(): End Sub
|
---|
[262] | 42 | Virtual Function EndRead(ByRef asyncResult As System.IAsyncResult) As Long: End Function
|
---|
| 43 | Virtual Sub EndWrite(ByRef asyncResult As System.IAsyncResult): End Sub
|
---|
[119] | 44 | Abstract Sub Flush()
|
---|
| 45 | Abstract Function Read(ByRef buffer[] As Byte, offset As Long, count As Long) As Long
|
---|
[112] | 46 |
|
---|
[119] | 47 | Virtual Function ReadByte() As Long
|
---|
| 48 | Dim b As Byte
|
---|
[252] | 49 | Dim ret = Read(b, 0, 1)
|
---|
[119] | 50 | If ret <> 0 Then
|
---|
| 51 | Return b
|
---|
| 52 | Else
|
---|
| 53 | Return -1
|
---|
| 54 | End If
|
---|
| 55 | End Function
|
---|
| 56 |
|
---|
| 57 | Abstract Function Seek(offset As Int64, origin As SeekOrigin) As Long
|
---|
[248] | 58 | Abstract Sub SetLength(value As Int64)
|
---|
[119] | 59 | Abstract Sub Write(ByRef buffer[] As Byte, offset As Long, count As Long)
|
---|
| 60 |
|
---|
| 61 | Virtual Sub WriteByte(b As Byte)
|
---|
[252] | 62 | Write(b, 0, 1)
|
---|
[119] | 63 | End Sub
|
---|
[112] | 64 | Protected
|
---|
[262] | 65 | Virtual Function CreateWaitHandle() As System.Threading.WaitHandle: End Function
|
---|
[112] | 66 | End Class
|
---|