superclass: object% |
An editor-stream-out% object is used to write editor information to a file or other output stream (such as the clipboard).
(make-object editor-stream-out% base) |
base : (is-a?/c editor-stream-out-base%) |
An out-stream base – possibly an editor-stream-out-bytes-base% object – must be supplied in base.
pos : nonnegative-exact-integer? |
Jumps to a given position in the stream.
Returns #t if the stream is ready for writing, #f otherwise. Writing to a bad stream has no effect.
(send an-editor-stream-out pretty-finish) → void? |
Ensures that the stream ends with a newline. This method is called by write-editor-global-footer.
(send an-editor-stream-out pretty-start) → void? |
Writes a “comment” into the stream that identifies the file format. This method is called by write-editor-global-header.
n : nonnegative-exact-integer? |
v : bytes? |
v : bytes? |
v : real? |
Writes v, or n bytes of v.
When n is supplied, use get-unterminated-bytes to read the bytes later.
If n is not supplied and v is a byte string, then for historical reasons, the actual number of bytes written includes a #\nul terminator, so use get-bytes instead of get-unterminated-bytes to read the bytes later.
Puts a fixed-sized integer into the stream. This method is needed because numbers are usually written in a way that takes varying numbers of bytes. In some cases it is useful to temporary write a 0 to a stream, write more data, and then go back and change the 0 to another number; such a process requires a fixed-size number.
Numbers written to a stream with put-fixed must be read with get-fixed.
(send an-editor-stream-out tell) → nonnegative-exact-integer? |
Returns the current stream position.