--- a/terminals/Xtreams__PointerReadStream.st Wed Feb 01 00:34:28 2012 +0000
+++ b/terminals/Xtreams__PointerReadStream.st Wed Feb 01 00:37:59 2012 +0000
@@ -43,16 +43,21 @@
!
read: anInteger into: aSequenceableCollection at: startIndex
-
- | count |
- count := self available ifNil: [ anInteger ] ifNotNil: [ :available | available min: anInteger ].
- source type referentType = UnsignedChar
- ifTrue: [ source copyAt: position to: aSequenceableCollection size: anInteger startingAt: startIndex. ]
- ifFalse: [ startIndex to: startIndex + count - 1 do: [ :i | aSequenceableCollection at: i put: self get ] ].
- position := position + count.
- ^count < anInteger
- ifTrue: [ (Incomplete on: aSequenceableCollection count: count at: startIndex) raise ]
- ifFalse: [ count ]
+
+ | count available |
+ count := (available := self available) isNil ifTrue: [ anInteger ] ifFalse: [ available min: anInteger ].
+ self breakPoint: #jv.
+ self breakPoint: #mk.
+ "There is no UnsignedChar here..."
+ source type referentType = UnsignedChar
+ ifTrue: [ source copyAt: position to: aSequenceableCollection size: anInteger startingAt: startIndex. ]
+ ifFalse: [ startIndex to: startIndex + count - 1 do: [ :i | aSequenceableCollection at: i put: self get ] ].
+ position := position + count.
+ ^count < anInteger
+ ifTrue: [ (Incomplete on: aSequenceableCollection count: count at: startIndex) raise ]
+ ifFalse: [ count ]
+
+ "Modified: / 01-02-2012 / 00:37:43 / Jan Vrany <jan.vrany@fit.cvut.cz>"
! !
!PointerReadStream methodsFor:'initialize-release'!