source: Include/Classes/System/IO/Stream.ab@ 277

Last change on this file since 277 was 271, checked in by dai, 17 years ago

SHFILEOPSTRUCT.hWnd → SHFILEOPSTRUCT.hwnd
System.IOに属するクラスに名前空間を適用した。

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