equal
deleted
inserted
replaced
133 "when copying, return a real (mutable) ByteArray" |
133 "when copying, return a real (mutable) ByteArray" |
134 |
134 |
135 |sz| |
135 |sz| |
136 |
136 |
137 sz := self size. |
137 sz := self size. |
138 ^ (ByteArray new:sz) |
138 ^ (ByteArray new:sz) replaceBytesFrom:1 to:sz with:self startingAt:1 |
139 replaceBytesFrom:1 to:sz with:self startingAt:1 |
|
140 |
139 |
141 " |
140 " |
142 #[1 2 3 4] asImmutableByteArray shallowCopy |
141 #[1 2 3 4] asImmutableByteArray shallowCopy |
143 " |
142 " |
144 ! ! |
143 ! ! |
145 |
144 |
146 !ImmutableByteArray methodsFor:'private'! |
145 !ImmutableByteArray methodsFor:'private'! |
147 |
146 |
148 species |
147 species |
|
148 "Copies should be mutable" |
|
149 |
|
150 ^ ByteArray |
|
151 ! |
|
152 |
|
153 speciesForCopy |
149 "Copies should be mutable" |
154 "Copies should be mutable" |
150 |
155 |
151 ^ ByteArray |
156 ^ ByteArray |
152 ! ! |
157 ! ! |
153 |
158 |
191 ! ! |
196 ! ! |
192 |
197 |
193 !ImmutableByteArray class methodsFor:'documentation'! |
198 !ImmutableByteArray class methodsFor:'documentation'! |
194 |
199 |
195 version_CVS |
200 version_CVS |
196 ^ '$Header: /cvs/stx/stx/libbasic/ImmutableByteArray.st,v 1.11 2012-10-16 15:11:45 cg Exp $' |
201 ^ '$Header: /cvs/stx/stx/libbasic/ImmutableByteArray.st,v 1.12 2014-05-06 20:21:12 cg Exp $' |
197 ! ! |
202 ! ! |
|
203 |