--- a/ByteArray.st Mon Jun 06 10:37:21 2016 +0100
+++ b/ByteArray.st Mon Jun 06 10:56:12 2016 +0100
@@ -164,7 +164,6 @@
! !
-
!ByteArray class methodsFor:'queries'!
elementByteSize
@@ -183,9 +182,22 @@
^ self == ByteArray
"Modified: 23.4.1996 / 15:56:25 / cg"
+!
+
+maxVal
+ "the minimum value which can be stored in instances of me.
+ For ByteArrays, this is 255"
+
+ ^ 255
+!
+
+minVal
+ "the minimum value which can be stored in instances of me.
+ For ByteArrays, this is 0"
+
+ ^ 0
! !
-
!ByteArray methodsFor:'Compatibility-Squeak'!
bitXor:aByteArray
@@ -198,22 +210,24 @@
size := self size.
size1 := aByteArray size.
size1 < size ifTrue:[
- size := size1.
+ size := size1.
].
^ self copy
- bitXorBytesFrom:1 to:size with:aByteArray startingAt:1;
- yourself.
+ bitXorBytesFrom:1 to:size with:aByteArray startingAt:1;
+ yourself.
"
- #[0 1 2 3 4] bitXor:#[0 1 2 3 4]
- #[0 1 2 3 4] bitXor:#[0 1 2 3]
+ #[0 1 2 3 4] bitXor:#[0 1 2 3 4]
+ #[0 1 2 3 4] bitXor:#[0 1 2 3]
"
! !
!ByteArray methodsFor:'Compatibility-VW'!
asByteString
+ "same as asString, for visualworks compatibility"
+
^ self asString
! !
@@ -3092,7 +3106,6 @@
"
! !
-
!ByteArray methodsFor:'searching'!
indexOf:aByte startingAt:start
@@ -3158,7 +3171,6 @@
"
! !
-
!ByteArray methodsFor:'testing'!
isByteArray