Changeset 553
- Timestamp:
- Jul 19, 2008, 2:26:09 AM (16 years ago)
- Location:
- trunk/ab5.0/ablib/src/Classes
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/ab5.0/ablib/src/Classes/System/IO/BinaryReader.ab
r434 r553 13 13 Sub BinaryReader(input As Stream) 14 14 stream = input 15 coding= New System.Text.UTF8Encoding()15 enc = New System.Text.UTF8Encoding() 16 16 End Sub 17 17 /*! … … 24 24 Sub BinaryReader(input As Stream, encoding As System.Text.Encoding) 25 25 This.stream = input 26 This. coding= encoding26 This.enc = encoding 27 27 End Sub 28 28 … … 280 280 Private 281 281 stream As Stream 282 codingAs System.Text.Encoding282 enc As System.Text.Encoding 283 283 End Class 284 284 -
trunk/ab5.0/ablib/src/Classes/System/IO/BinaryWriter.ab
r488 r553 4 4 5 5 Class BinaryWriter 6 Implements IDisposable6 Implements System.IDisposable 7 7 8 8 Public 'constructor … … 18 18 */ 19 19 Sub BinaryWriter(output As System.IO.Stream) 20 This.OutStream=output 20 21 End Sub 21 22 … … 24 25 */ 25 26 Sub BinaryWriter(output As System.IO.Stream, encoding As System.Text.Encoding) 27 This.OutStream=output 28 This.Enc = encoding 26 29 End Sub 27 30 … … 55 58 */ 56 59 Sub Close() 57 This.Dispose d()60 This.Dispose(True) 58 61 End Sub 59 62 … … 76 79 */ 77 80 Sub Write(value As Boolean) 81 This.OutStream.Write( VarPtr(value) As *Byte, 0, SizeOf(Boolean)) 78 82 End Sub 79 83 … … 82 86 */ 83 87 Sub WriteByte(value As Byte) 88 This.OutStream.Write( VarPtr(value) As *Byte, 0, SizeOf(Byte)) 84 89 End Sub 85 90 … … 95 100 */ 96 101 Sub Write(value As Char) 102 This.OutStream.Write( VarPtr(value) As *Byte, 0, SizeOf(Char)) 97 103 End Sub 98 104 … … 115 121 */ 116 122 Sub Write(value As Double) 123 This.OutStream.Write( VarPtr(value) As *Byte, 0, SizeOf(Double)) 117 124 End Sub 118 125 … … 121 128 */ 122 129 Sub Write(value As Integer) 130 This.OutStream.Write( VarPtr(value) As *Byte, 0, SizeOf(Integer)) 123 131 End Sub 124 132 … … 127 135 */ 128 136 Sub Write(value As Long) 137 This.OutStream.Write( VarPtr(value) As *Byte, 0, SizeOf(Long)) 129 138 End Sub 130 139 … … 133 142 */ 134 143 Sub Write(value As Int64) 144 This.OutStream.Write( VarPtr(value) As *Byte, 0, SizeOf(Int64)) 135 145 End Sub 136 146 … … 139 149 */ 140 150 Sub WriteSByte(value As SByte) 151 This.OutStream.Write( VarPtr(value) As *Byte, 0, SizeOf(SByte)) 141 152 End Sub 142 153 … … 145 156 */ 146 157 Sub Write(value As Single) 158 This.OutStream.Write( VarPtr(value) As *Byte, 0, SizeOf(Single)) 147 159 End Sub 148 160 … … 151 163 */ 152 164 Sub Write(value As String) 165 This.OutStream.Write( ToTCStr(value) As *Byte, 0, value.Length()*SizeOf(TCHAR)) 153 166 End Sub 154 167 … … 157 170 */ 158 171 Sub Write(value As Word) 172 This.OutStream.Write( VarPtr(value) As *Byte, 0, SizeOf(Word)) 159 173 End Sub 160 174 … … 163 177 */ 164 178 Sub Write(value As DWord) 179 This.OutStream.Write( VarPtr(value) As *Byte, 0, SizeOf(DWord)) 165 180 End Sub 166 181 … … 169 184 */ 170 185 Sub Write(value As QWord) 186 This.OutStream.Write( VarPtr(value) As *Byte, 0, SizeOf(QWord)) 171 187 End Sub 172 188 … … 175 191 */ 176 192 Sub Write(buffer As *Byte, index As Long, count As Long) 193 This.OutStream.Write( VarPtr(buffer[index]) As *Byte, 0, count) 177 194 End Sub 178 195 … … 180 197 現在のストリームに文字配列の特定の領域を書き込み、使用した Encoding とストリームに書き込んだ特定の文字に従ってストリームの現在位置を進めます。 181 198 */ 182 Sub Write(chars As *Char, index As Long, count As Long)183 End Sub 199 /* Sub Write(chars As *Char, index As Long, count As Long) 200 End Sub*/ 184 201 185 202 /* 186 203 32 ビット整数を圧縮形式で書き込みます。 187 204 */ 188 Sub Write7BitEncodedInt()189 End Sub 205 /* Sub Write7BitEncodedInt() 206 End Sub*/ 190 207 191 208 /* 192 209 BinaryWriter によって使用されているアンマネージ リソースを解放し、オプションでマネージ リソースも解放します。 193 210 */ 194 Sub Dispose() 211 212 Protected 213 Virtual Sub Dispose(disposing As Boolean) 195 214 This.OutStream.Close() 196 215 End Sub -
trunk/ab5.0/ablib/src/Classes/index.ab
r545 r553 55 55 '#require "./System/Drawing/Imaging/misc.ab" 56 56 '#require "./System/Drawing/Text/misc.ab" 57 #require "./System/IO/BinaryReader.ab" 58 #require "./System/IO/BinaryWriter.ab" 57 59 #require "./System/IO/Directory.ab" 58 60 #require "./System/IO/DirectoryInfo.ab"
Note:
See TracChangeset
for help on using the changeset viewer.