ServerJS/IO/A: Difference between revisions

Line 70: Line 70:
== Memory based I/O ==
== Memory based I/O ==


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.  
The io module provides two classes for in-memory streams: ByteBuffer for a stream backed by a ByteArray, and StringBuffer for an memory-backed text stream that works with strings.  


Memory based streams are readable, writable, and seekable and implement the interface defined for Stream and TextStream, respectively, including the '''read()''', '''readInto()''', and '''write()''' methods and the '''length''', and '''position''' properties.
Memory streams are readable, writable, and seekable and implement the interface defined for Stream and TextStream, respectively, including the '''read()''', '''readInto()''', and '''write()''' methods and the '''length''', and '''position''' properties.


=== ByteBuffer ===
=== ByteBuffer ===
55

edits