ReadStream.st
changeset 8987 b0d7be646112
parent 8914 acac69ff65b0
child 9305 6836bc44f3c3
--- a/ReadStream.st	Mon Nov 14 14:46:25 2005 +0100
+++ b/ReadStream.st	Mon Nov 14 14:48:58 2005 +0100
@@ -45,6 +45,7 @@
 "
 ! !
 
+
 !ReadStream methodsFor:'converting'!
 
 readStream
@@ -327,14 +328,12 @@
 
     (initialIndex + numBytes - 1) <= aCollection size ifTrue:[
         (position + numBytes - 1) <= readLimit ifTrue:[
-            collection class isBytes ifTrue:[
-                aCollection class isBytes ifTrue:[ 
-                    aCollection 
-                        replaceBytesFrom:initialIndex to:(initialIndex + numBytes - 1) 
-                        with:collection startingAt:position+1.
-                    position := position + numBytes.
-                    ^ numBytes
-                ].
+            (collection isByteCollection and:[aCollection isByteCollection]) ifTrue:[ 
+                aCollection 
+                    replaceBytesFrom:initialIndex to:(initialIndex + numBytes - 1) 
+                    with:collection startingAt:position+1.
+                position := position + numBytes.
+                ^ numBytes
             ].
         ].
     ].
@@ -787,5 +786,5 @@
 !ReadStream class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libbasic/ReadStream.st,v 1.54 2005-07-08 17:17:22 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic/ReadStream.st,v 1.55 2005-11-14 13:48:58 stefan Exp $'
 ! !