source: trunk/Include/Classes/System/IO/Stream.ab@ 435

Last change on this file since 435 was 432, checked in by イグトランス (egtra), 16 years ago

StreamReaderの完成。StringReaderの追加。
Consoleの追加(現在入力関係の一部のみ)。

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