SimpleIOStream

open class SimpleIOStream(pointer: <Error class: unknown class><<Error class: unknown class>>) : IOStream

GSimpleIOStream creates a class@Gio.IOStream from an arbitrary class@Gio.InputStream and class@Gio.OutputStream. This allows any pair of input and output streams to be used with class@Gio.IOStream methods.

This is useful when you obtained a class@Gio.InputStream and a class@Gio.OutputStream by other means, for instance creating them with platform specific methods as ../gio-unix/ctor.UnixInputStream.new.html (from gio-unix-2.0.pc / GioUnix-2.0), and you want to take advantage of the methods provided by class@Gio.IOStream.

Skipped during bindings generation

  • method input-stream: Property has no getter nor setter

  • method output-stream: Property has no getter nor setter

Since

2.44

Constructors

Link copied to clipboard
constructor(inputStream: InputStream, outputStream: OutputStream)

Creates a new #GSimpleIOStream wrapping @input_stream and @output_stream. See also #GIOStream.

constructor(pointer: <Error class: unknown class><<Error class: unknown class>>)

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard
val gioIOStreamPointer: <Error class: unknown class><<Error class: unknown class>>
Link copied to clipboard
val gioSimpleIOStreamPointer: <Error class: unknown class><<Error class: unknown class>>
Link copied to clipboard

The class@Gio.InputStream to read from.

Link copied to clipboard

The class@Gio.OutputStream to write to.

Functions

Link copied to clipboard
open fun clearPending()

Clears the pending flag on @stream.

Link copied to clipboard
open fun close(cancellable: Cancellable? = null): <Error class: unknown class><Boolean>

Closes the stream, releasing resources related to it. This will also close the individual input and output streams, if they are not already closed.

Link copied to clipboard
open fun closeAsync(ioPriority: Int, cancellable: Cancellable? = null, callback: AsyncReadyCallback)

Requests an asynchronous close of the stream, releasing resources related to it. When the operation is finished @callback will be called. You can then call g_io_stream_close_finish() to get the result of the operation.

Link copied to clipboard
open fun closeFinish(result: AsyncResult): <Error class: unknown class><Boolean>

Closes a stream.

Link copied to clipboard

Gets the input stream for this object. This is used for reading.

Link copied to clipboard

Gets the output stream for this object. This is used for writing.

Link copied to clipboard
open fun hasPending(): Boolean

Checks if a stream has pending actions.

Link copied to clipboard
open fun isClosed(): Boolean

Checks if a stream is closed.

Link copied to clipboard
open fun setPending(): <Error class: unknown class><Boolean>

Sets @stream to have actions pending. If the pending flag is already set or @stream is closed, it will return false and set

Link copied to clipboard
open fun spliceAsync(stream2: IOStream, flags: IOStreamSpliceFlags, ioPriority: Int, cancellable: Cancellable? = null, callback: AsyncReadyCallback)

Asynchronously splice the output stream of @stream1 to the input stream of