55
edits
mNo edit summary |
No edit summary |
||
Line 61: | Line 61: | ||
=== Text I/O === | === Text I/O === | ||
=== In-Memory Streams === | |||
The io module provides two classes for in-memory stream: ByteBuffer for an in-memory stream backed by a ByteArray, and StringBuffer for an in-memory text stream that works with strings. | |||
==== ByteBuffer ==== | |||
;[new] ByteBuffer() ByteBuffer | |||
:Create a new ByteBuffer with the default capacity | |||
;[new] ByteBuffer(b ByteArray) ByteBuffer | |||
:Create a new ByteBuffer with b as underlying buffer | |||
;[new] ByteBuffer(l Number) ByteBuffer | |||
:Create a new ByteBuffer with a capacity of l bytes | |||
===== Instance Methods ===== | |||
;toByteString | |||
: | |||
;toByteArray | |||
: | |||
;toBinary | |||
: | |||
==== StringBuffer ==== | |||
;[new] StringBuffer() StringBuffer | |||
:Create a new StringBuffer with the default capacity | |||
;[new] StringBuffer(s String) StringBuffer | |||
:Create a new StringBuffer with the characters from s as inital content | |||
;[new] StringBuffer(l Number) StringBuffer | |||
:Create a new StringBuffer with a capacity of l bytes | |||
===== Instance Methods ===== | |||
;toString() | |||
: |
edits