Changeset 682 for trunk/ab5.0/ablib/src/Classes/System/IO/Stream.ab
- Timestamp:
- Feb 16, 2009, 4:26:24 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/ab5.0/ablib/src/Classes/System/IO/Stream.ab
r609 r682 155 155 End Class 156 156 157 /*! 158 @brief 書き込みバイト数を記憶するヌルストリーム 159 Encoding関連で使用 160 @date 2009/02/16 161 @auther Egtra 162 */ 163 Class WriteCountingNullStream 164 Inherits NullStream 165 Public 166 Sub WriteCountingNullStream() 167 writeCount = 0 168 End Sub 169 170 Override Sub Write(buffer As *Byte, offset As Long, count As Long) 171 If count < 0 Then 172 Throw New ArgumentOutOfRangeException("count") 173 End If 174 writeCount += count 175 End Sub 176 177 Override Sub WriteByte(b As Byte) 178 writeCount++ 179 End Sub 180 181 /*! 182 @brief 書き込まれたバイト数を返す。 183 */ 184 Function WriteCount() As Long 185 WriteCount = writeCount 186 End Function 187 188 Private 189 writeCount As Long 190 End Class 191 157 192 End Namespace 158 193
Note:
See TracChangeset
for help on using the changeset viewer.