ServerJS/IO/A: Difference between revisions

Jump to navigation Jump to search
No edit summary
Line 121: Line 121:
In addition to the methods and properties defined for the '''TextStream''' class, ByteBuffers implement the following methods:
In addition to the methods and properties defined for the '''TextStream''' class, ByteBuffers implement the following methods:


;append(s String)
;append(s String, [begin Number], [end Number])
:Append a string to the end of the buffer. This is equal to setting the stream's position to the value of its length property followed by write(s).
:Append a string to the end of the buffer. This is equal to setting the stream's position to the value of its length property followed by write(s).


;insert(s String, pos Number)
;insert(pos Number, s String, [begin Number], [end Number])
:Insert a string at the given position, moving any characters above that position and increasing the length of the buffer by s.length.
:Insert a string at the given position, moving any characters above that position and increasing the length of the buffer by s.length.


;toString() String
;toString() String
:Return the value of the whole buffer as String
:Return the value of the whole buffer as String
55

edits

Navigation menu