ImmutableByteArray.st
changeset 12488 889416ab718a
parent 12472 4538fa289fda
child 12493 a8a69ca4a721
--- a/ImmutableByteArray.st	Thu Nov 05 17:34:58 2009 +0100
+++ b/ImmutableByteArray.st	Thu Nov 05 17:34:59 2009 +0100
@@ -95,6 +95,16 @@
 
 !ImmutableByteArray methodsFor:'converting'!
 
+asByteArray
+    "return the receiver as a (mutable) byteArray"
+
+    ^ self copy changeClassTo: ByteArray
+
+    "
+     #[1 2 3 4] asImmutableByteArray asByteArray   
+    "
+!
+
 asImmutableByteArray
     ^ self
 ! !
@@ -193,6 +203,12 @@
     "yes, I must be"
     ^ true
 
+!
+
+referencesAny:aCollection
+    "redefined to speed up searching when many byteArray instances are present"
+
+    ^ false
 ! !
 
 !ImmutableByteArray methodsFor:'specials'!
@@ -216,5 +232,5 @@
 !ImmutableByteArray class methodsFor:'documentation'!
 
 version_CVS
-    ^ '$Header: /cvs/stx/stx/libbasic/ImmutableByteArray.st,v 1.4 2009-11-05 14:42:48 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic/ImmutableByteArray.st,v 1.5 2009-11-05 16:34:59 cg Exp $'
 ! !