"
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' }"
PeekableStream 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'!
atEnd
^ stream atEnd
!
close
stream close
!
cr
stream cr
!
nextChunk
|chunk|
chunk := stream nextChunk.
chunk isNil ifTrue:[^ chunk].
^ encoder decodeString:chunk
!
nextChunkPut:chunk
stream nextChunkPut:(encoder encodeString:chunk)
!
nextPut:aCharacter
self nextPutAll:(aCharacter asString).
!
nextPutAll:aCollection
stream nextPutAll:(encoder encodeString:aCollection).
!
peek
^ stream peek
!
peekFor:aCharacter
^ stream peekFor:aCharacter
!
position
^ stream position
!
position0Based
^ stream position0Based
!
position0Based:newPosition
stream position0Based:newPosition
!
position1Based
^ stream position1Based
!
position1Based:newPosition
stream position1Based:newPosition
!
position:newPosition
stream position:newPosition
!
setToEnd
stream setToEnd
!
skipSeparators
^ stream skipSeparators
! !
!EncodedStream class methodsFor:'documentation'!
version
^ '$Header: /cvs/stx/stx/libbasic/EncodedStream.st,v 1.9 2004-07-13 13:10:20 stefan Exp $'
! !