ByteArray.st
changeset 23925 fcde2f1eefbe
parent 23800 0f0470940b33
child 24246 5891fd2af1ec
--- a/ByteArray.st	Fri Mar 15 15:31:20 2019 +0100
+++ b/ByteArray.st	Fri Mar 15 15:31:33 2019 +0100
@@ -1,3 +1,5 @@
+"{ Encoding: utf8 }"
+
 "
  COPYRIGHT (c) 1989 by Claus Gittinger
 	      All Rights Reserved
@@ -1087,6 +1089,14 @@
     ].
 !
 
+asImmutableCollection
+    "return a write-protected copy of myself"
+
+    ^ self asImmutableByteArray
+
+    "Created: / 15-03-2019 / 13:48:05 / Stefan Vogel"
+!
+
 asInteger
     "convert myself to an unsigned integer - the first byte is most significant.
      This is also in Squeak."