#OTHER by cg
authorClaus Gittinger <cg@exept.de>
Mon, 27 May 2019 15:01:51 +0200
changeset 24173 ee8d63b7e7a4
parent 24172 ddd5ab5bc403
child 24174 ad6a44e0f038
#OTHER by cg category of: #postCopy #postDeepCopy #postDeepCopyFrom:
ImmutableByteArray.st
--- a/ImmutableByteArray.st	Mon May 27 15:01:44 2019 +0200
+++ b/ImmutableByteArray.st	Mon May 27 15:01:51 2019 +0200
@@ -1,5 +1,3 @@
-"{ Encoding: utf8 }"
-
 "
  COPYRIGHT (c) 2009 by eXept Software AG
 	      All Rights Reserved
@@ -319,6 +317,21 @@
 
 !ImmutableByteArray methodsFor:'copying'!
 
+shallowCopy
+    "when copying, return a real (mutable) ByteArray"
+
+    |sz|
+
+    sz := self size.
+    ^ (ByteArray new:sz) replaceBytesFrom:1 to:sz with:self startingAt:1
+
+    "
+     #[1 2 3 4] asImmutableByteArray shallowCopy
+    "
+! !
+
+!ImmutableByteArray methodsFor:'copying-private'!
+
 postCopy
     "when copied, make me a real (mutable) ByteArray"
 
@@ -335,19 +348,6 @@
      #[1 2 3 4] asImmutableByteArray shallowCopy   class
      #[1 2 3 4] asImmutableByteArray deepCopy      class
     "
-!
-
-shallowCopy
-    "when copying, return a real (mutable) ByteArray"
-
-    |sz|
-
-    sz := self size.
-    ^ (ByteArray new:sz) replaceBytesFrom:1 to:sz with:self startingAt:1
-
-    "
-     #[1 2 3 4] asImmutableByteArray shallowCopy
-    "
 ! !
 
 !ImmutableByteArray methodsFor:'printing & storing'!