SimpleIOStream

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

GSimpleIOStream creates a #GIOStream from an arbitrary #GInputStream and #GOutputStream. This allows any pair of input and output streams to be used with #GIOStream methods.

This is useful when you obtained a #GInputStream and a #GOutputStream by other means, for instance creating them with platform specific methods as g_unix_input_stream_new() or g_win32_input_stream_new(), and you want to take advantage of the methods provided by #GIOStream.

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
Link copied to clipboard

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