--- a/Stream.st Tue Apr 12 13:03:27 2016 +0200
+++ b/Stream.st Tue Apr 12 18:43:17 2016 +0200
@@ -275,8 +275,6 @@
"Modified: 10.1.1996 / 19:39:19 / cg"
! !
-
-
!Stream methodsFor:'accessing'!
contents
@@ -1778,6 +1776,24 @@
!Stream methodsFor:'non homogenous writing'!
+next:count putByte:aByteValue
+ "write a byte n times"
+
+ |n "{ Class: SmallInteger }"|
+
+ n := count.
+ n timesRepeat:[self nextPutByte:aByteValue].
+
+ "
+ |s|
+ s := ByteArray new writeStream.
+ s nextPutByte:1.
+ s next:10 putByte:99.
+ s nextPutByte:2.
+ s contents
+ "
+!
+
nextNumber:n put:v
"Append to the receiver the argument, v, which is a positive Integer,
as the next n bytes. Bytes are written msb first.