forked from SeasideSt/Grease
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathGRNullCodecStream.class.st
More file actions
41 lines (34 loc) · 1017 Bytes
/
GRNullCodecStream.class.st
File metadata and controls
41 lines (34 loc) · 1017 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
"
A WANullCodecStream is a WriteStream on a String on which you can both put binary and character data without encoding happening.
Instance Variables
stream: <WriteStream>
stream
- a WriteStream on a String
"
Class {
#name : #GRNullCodecStream,
#superclass : #GRCodecStream,
#category : #'Grease-Core-Text'
}
{ #category : #streaming }
GRNullCodecStream >> next [
^ stream next
]
{ #category : #streaming }
GRNullCodecStream >> next: anInteger [
^ stream next: anInteger
]
{ #category : #streaming }
GRNullCodecStream >> nextPut: aCharacterOrByte [
aCharacterOrByte isCharacter
ifTrue: [ stream nextPut: aCharacterOrByte ]
ifFalse: [ stream nextPut: (Character codePoint: aCharacterOrByte) ]
]
{ #category : #streaming }
GRNullCodecStream >> nextPutAll: aStringOrByteArray [
aStringOrByteArray isString
ifTrue: [ stream nextPutAll: aStringOrByteArray ]
ifFalse: [
1 to: aStringOrByteArray size do: [ :index |
stream nextPut: (Character codePoint: (aStringOrByteArray at: index)) ] ]
]