# HG changeset patch # User Stefan Vogel # Date 1058179913 -7200 # Node ID ddabde2900d219e30b73827fd43822aadbb64914 # Parent a0835d8616ea7a0b0e69fcd2a58dab13969f04da Use contentsSpecies diff -r a0835d8616ea -r ddabde2900d2 ExternalStream.st --- a/ExternalStream.st Mon Jul 14 12:20:29 2003 +0200 +++ b/ExternalStream.st Mon Jul 14 12:51:53 2003 +0200 @@ -4109,15 +4109,6 @@ !ExternalStream methodsFor:'queries'! -contentsClass - "answer the class, we stream on (a collection class)" - - binary ifTrue:[ - ^ ByteArray - ]. - ^ String -! - isBinary "return true, if the stream is in binary (as opposed to text-) mode. The default when created is false." @@ -5752,7 +5743,7 @@ !ExternalStream class methodsFor:'documentation'! version - ^ '$Header: /cvs/stx/stx/libbasic/ExternalStream.st,v 1.256 2003-07-14 10:19:41 stefan Exp $' + ^ '$Header: /cvs/stx/stx/libbasic/ExternalStream.st,v 1.257 2003-07-14 10:51:53 stefan Exp $' ! ! ExternalStream initialize! diff -r a0835d8616ea -r ddabde2900d2 PositionableStream.st --- a/PositionableStream.st Mon Jul 14 12:20:29 2003 +0200 +++ b/PositionableStream.st Mon Jul 14 12:51:53 2003 +0200 @@ -1114,12 +1114,6 @@ !PositionableStream methodsFor:'queries'! -contentsClass - "answer the class, we stream on (a collection class)" - - ^ collection class -! - isPositionable "return true, if the stream supports positioning (this one is)" @@ -1198,7 +1192,7 @@ !PositionableStream class methodsFor:'documentation'! version - ^ '$Header: /cvs/stx/stx/libbasic/PositionableStream.st,v 1.130 2003-07-14 10:20:29 stefan Exp $' + ^ '$Header: /cvs/stx/stx/libbasic/PositionableStream.st,v 1.131 2003-07-14 10:50:45 stefan Exp $' ! ! PositionableStream initialize! diff -r a0835d8616ea -r ddabde2900d2 Stream.st --- a/Stream.st Mon Jul 14 12:20:29 2003 +0200 +++ b/Stream.st Mon Jul 14 12:51:53 2003 +0200 @@ -1494,17 +1494,11 @@ !Stream methodsFor:'queries'! -contentsClass - "answer the class, we stream on (a collection class)" - - ^ self subclassResponsibility -! - isBinary "return true, if in binary mode. Always returns false here, to make internalStreams protocol compatible with externalStreams." - ^ self contentsClass == ByteArray + ^ self contentsSpecies == ByteArray "Modified: 15.5.1996 / 17:53:51 / cg" ! @@ -1602,7 +1596,7 @@ |buffer bytesWritten| bytesWritten := 0. - buffer := self contentsClass new:bufferSize. + buffer := self contentsSpecies new:bufferSize. [self atEnd] whileFalse:[ |readCount count| readCount := self nextAvailableBytes:bufferSize into:buffer startingAt:1. @@ -2587,7 +2581,7 @@ !Stream class methodsFor:'documentation'! version - ^ '$Header: /cvs/stx/stx/libbasic/Stream.st,v 1.117 2003-07-14 10:20:10 stefan Exp $' + ^ '$Header: /cvs/stx/stx/libbasic/Stream.st,v 1.118 2003-07-14 10:51:20 stefan Exp $' ! ! Stream initialize!