BlogGitHub
Reference/ORK/IO_STREAMS/ORK/IF_IO_OUTPUT_STREAM
Interface/ORK/IF_IO_OUTPUT_STREAM
OutputStream
Package
/ORK/IO_STREAMS
Interfaces
/ORK/IF_IO_STREAM_BASE
Members
4
4 items
Methods
write
MethodPublic

Writes a sequence of bytes to the current stream and advances the current position within this stream by the number of bytes written.

Parameters

NameDescriptionbufferAn array of bytes. This method copies count bytes from buffer to the current stream.offsetThe zero-based byte offset in buffer at which to begin copying bytes to the current stream.countThe number of bytes to be written to the current stream. -1 means that the remaining length is used.

Signature

METHODS write IMPORTING !buffer TYPE xsequence
                          !offset TYPE i DEFAULT 0
                          !count TYPE i DEFAULT -1.
set_content
MethodPublic

Sets the entire content of the current stream to the provided data. Any existing data is discarded, the new bytes are written starting at offset zero, and the stream’s length is updated to match the size of the /ork/if_io_output_stream.METH:set_content.DATA:content parameter.

Parameters

NameDescriptioncontentByte sequence to write into the stream (replaces all previous content).

Signature

METHODS set_content IMPORTING content TYPE xstring.
set_length
MethodPublic

Sets the length of the current stream.

  • If the specified value is less than the current length of the stream, the stream is truncated.
  • If the specified value is larger than the current length of the stream, the stream is expanded.
  • If the stream is expanded, the contents of the stream between the old and the new length are not defined.

A stream must support expansion, writing and seeking for /ork/if_io_stream_base.METH:set_length to work.

Use the /ork/if_io_stream_base.METH:can_write and /ork/if_io_stream_base.METH:can_expand method to determine whether expansion or writing is supported.

Parameters

NameDescriptionlengthThe desired length of the current stream in bytes.

Signature

METHODS set_length IMPORTING !length TYPE int8.
flush
MethodPublic

Clears all buffers for this stream and causes any buffered data to be written to the underlying device.

Signature

METHODS flush.
Repository11 packages · 113 objects
124 items