ByteArray.st
changeset 21539 8533ab5cdbf5
parent 21483 582158f616ff
child 21736 fc05f985abf2
equal deleted inserted replaced
21538:5b99fa1b2343 21539:8533ab5cdbf5
  2692 !ByteArray methodsFor:'printing & storing'!
  2692 !ByteArray methodsFor:'printing & storing'!
  2693 
  2693 
  2694 displayOn:aGCOrStream
  2694 displayOn:aGCOrStream
  2695     "return a printed representation of the receiver for displaying"
  2695     "return a printed representation of the receiver for displaying"
  2696 
  2696 
       
  2697     |cls|
       
  2698 
  2697     "/ what a kludge - Dolphin and Squeak mean: printOn: a stream;
  2699     "/ what a kludge - Dolphin and Squeak mean: printOn: a stream;
  2698     "/ ST/X (and some old ST80's) mean: draw-yourself on a GC.
  2700     "/ old ST80 means: draw-yourself on a GC.
  2699     |cls|
       
  2700 
       
  2701     cls := self class.
  2701     cls := self class.
  2702     ((cls == ByteArray or:[cls == ImmutableByteArray]) and:[aGCOrStream isStream]) ifTrue:[
  2702     ((cls == ByteArray or:[cls == ImmutableByteArray]) and:[aGCOrStream isStream]) ifTrue:[
  2703 	self storeOn:aGCOrStream.
  2703         self storeOn:aGCOrStream.
  2704 	^ self
  2704         ^ self
  2705     ].
  2705     ].
  2706     ^ super displayOn:aGCOrStream
  2706     ^ super displayOn:aGCOrStream
  2707 
  2707 
  2708     "Created: 25.10.1995 / 13:33:26 / cg"
  2708     "Created: / 25-10-1995 / 13:33:26 / cg"
  2709     "Modified: 22.4.1996 / 12:54:06 / cg"
  2709     "Modified: / 22-04-1996 / 12:54:06 / cg"
       
  2710     "Modified (comment): / 22-02-2017 / 16:54:27 / cg"
  2710 !
  2711 !
  2711 
  2712 
  2712 printOn:aStream
  2713 printOn:aStream
  2713     "append a printed representation to aStream"
  2714     "append a printed representation to aStream"
  2714 
  2715