EncodedStream.st
author Claus Gittinger <cg@exept.de>
Tue, 09 Mar 2004 23:01:20 +0100
changeset 8148 dbf64e3142d9
parent 8147 416bcaa573ef
child 8165 d6446fc1ea3b
permissions -rw-r--r--
*** empty log message ***

"
 COPYRIGHT (c) 2004 by eXept Software AG
              All Rights Reserved

 This software is furnished under a license and may be used
 only in accordance with the terms of that license and with the
 inclusion of the above copyright notice.   This software may not
 be provided or otherwise made available to, or used by, any
 other person.  No title to or ownership of the software is
 hereby transferred.
"

"{ Package: 'stx:libbasic' }"

Stream subclass:#EncodedStream
	instanceVariableNames:'encoder stream'
	classVariableNames:''
	poolDictionaries:''
	category:'Collections-Text-Encodings'
!

!EncodedStream class methodsFor:'documentation'!

copyright
"
 COPYRIGHT (c) 2004 by eXept Software AG
              All Rights Reserved

 This software is furnished under a license and may be used
 only in accordance with the terms of that license and with the
 inclusion of the above copyright notice.   This software may not
 be provided or otherwise made available to, or used by, any
 other person.  No title to or ownership of the software is
 hereby transferred.
"
! !

!EncodedStream class methodsFor:'instance creation'!

stream:streamArg encoder:encoder
    ^ (self basicNew) stream:streamArg; encoder:encoder
! !

!EncodedStream methodsFor:'accessing'!

encoder
    ^ encoder
!

encoder:something
    encoder := something.
!

stream
    ^ stream
!

stream:something
    stream := something.
! !

!EncodedStream methodsFor:'stream protocol'!

nextChunk
    ^ encoder decodeString:(stream nextChunk)
!

nextPut:aCharacter
    self nextPutAll:(aCharacter asString).
!

nextPutAll:aCollection
    stream nextPutAll:(encoder encodeString:aCollection).
!

position1Based:newPosition
    stream position1Based:newPosition
! !

!EncodedStream class methodsFor:'documentation'!

version
    ^ '$Header: /cvs/stx/stx/libbasic/EncodedStream.st,v 1.3 2004-03-09 21:57:33 cg Exp $'
! !