author | Martin Kobetic |
Sun, 17 Nov 2013 00:23:18 -0500 | |
changeset 147 | bd6be28aa924 |
parent 111 | 44ac233b2f83 |
permissions | -rw-r--r-- |
10 | 1 |
"{ Package: 'stx:goodies/xtreams/transforms' }" |
2 |
||
3 |
"{ NameSpace: Xtreams }" |
|
4 |
||
5 |
ReadStream subclass:#DuplicateReadStream |
|
6 |
instanceVariableNames:'duplicate' |
|
7 |
classVariableNames:'' |
|
8 |
poolDictionaries:'' |
|
27
2cc5a8a3ca14
added XtreamsPool to fix DefaultBufferSize; set proper category names
mkobetic
parents:
10
diff
changeset
|
9 |
category:'Xtreams-Transforms' |
10 | 10 |
! |
11 |
||
12 |
DuplicateReadStream comment:'Duplicates contents flowing through the stream into a secondary write stream. |
|
13 |
||
14 |
Instance Variables |
|
15 |
duplicate <WriteStream> stream to duplicate the content to |
|
16 |
||
17 |
' |
|
18 |
! |
|
19 |
||
20 |
||
21 |
!DuplicateReadStream class methodsFor:'instance creation'! |
|
22 |
||
23 |
on: aSource duplicate: aDestination |
|
24 |
||
25 |
^self new on: aSource duplicate: aDestination |
|
26 |
! ! |
|
27 |
||
28 |
!DuplicateReadStream methodsFor:'accessing'! |
|
29 |
||
30 |
read: anInteger into: aSequenceableCollection at: startIndex |
|
31 |
||
32 |
[ source read: anInteger into: aSequenceableCollection at: startIndex. |
|
33 |
] on: Incomplete do: [ :incomplete | |
|
34 |
duplicate write: incomplete count from: aSequenceableCollection at: startIndex. |
|
35 |
incomplete pass ]. |
|
36 |
duplicate write: anInteger from: aSequenceableCollection at: startIndex |
|
37 |
! ! |
|
38 |
||
39 |
!DuplicateReadStream methodsFor:'initialize-release'! |
|
40 |
||
41 |
contentsSpecies |
|
42 |
||
43 |
^source contentsSpecies |
|
44 |
! |
|
45 |
||
46 |
on: aSource duplicate: aDestination |
|
47 |
||
48 |
super on: aSource. |
|
49 |
duplicate := aDestination |
|
50 |
! ! |
|
51 |
||
52 |
!DuplicateReadStream class methodsFor:'documentation'! |
|
53 |
||
111
44ac233b2f83
* removed namespace from pool references and stray extension methods
joe
parents:
72
diff
changeset
|
54 |
version_HG |
44ac233b2f83
* removed namespace from pool references and stray extension methods
joe
parents:
72
diff
changeset
|
55 |
|
44ac233b2f83
* removed namespace from pool references and stray extension methods
joe
parents:
72
diff
changeset
|
56 |
^ '$Changeset: <not expanded> $' |
44ac233b2f83
* removed namespace from pool references and stray extension methods
joe
parents:
72
diff
changeset
|
57 |
! |
44ac233b2f83
* removed namespace from pool references and stray extension methods
joe
parents:
72
diff
changeset
|
58 |
|
10 | 59 |
version_SVN |
60 |
^ '$Id$' |
|
61 |
! ! |
|
111
44ac233b2f83
* removed namespace from pool references and stray extension methods
joe
parents:
72
diff
changeset
|
62 |