gio.data_input_stream

Module for [DataInputStream] class

Types 3

Data input stream implements [gio.input_stream.InputStream] and includes functions for reading structured data directly from a binary input stream.

Methods
GType _gType() @property
DataInputStream self()Returns `this`, for use in `with` statements.
DataInputStreamGidBuilder builder()Get builder for [gio.datainputstream.DataInputStream] Returns: New builder object
gio.types.DataStreamByteOrder byteOrder() @propertyGet `byteOrder` property. Returns: The :byte-order property determines the byte ordering that is used when reading multi-byte entities (such as integers) from the stream.
void byteOrder(gio.types.DataStreamByteOrder propval) @propertySet `byteOrder` property. Params: propval = The :byte-order property determines the byte ordering that is used when reading multi-byte entities (such as integers) from the stream.
gio.types.DataStreamNewlineType newlineType() @propertyGet `newlineType` property. Returns: The :newline-type property determines what is considered as a line ending when reading complete lines from the stream.
void newlineType(gio.types.DataStreamNewlineType propval) @propertySet `newlineType` property. Params: propval = The :newline-type property determines what is considered as a line ending when reading complete lines from the stream.
gio.types.DataStreamByteOrder getByteOrder()Gets the byte order for the data input stream. Returns: the stream's current #GDataStreamByteOrder.
gio.types.DataStreamNewlineType getNewlineType()Gets the current newline type for the stream. Returns: #GDataStreamNewlineType for the given stream.
ubyte readByteData(gio.cancellable.Cancellable cancellable = null)Reads an unsigned 8-bit/1-byte value from stream.
short readInt16(gio.cancellable.Cancellable cancellable = null)Reads a 16-bit/2-byte value from stream.
int readInt32(gio.cancellable.Cancellable cancellable = null)Reads a signed 32-bit/4-byte value from stream.
long readInt64(gio.cancellable.Cancellable cancellable = null)Reads a 64-bit/8-byte value from stream.
void readLineAsync(int ioPriority, gio.cancellable.Cancellable cancellable = null, gio.types.AsyncReadyCallback callback = null)The asynchronous version of [gio.datainputstream.DataInputStream.readLine]. It is an error to have two outstanding calls to this function.
string readLineFinishUtf8(gio.async_result.AsyncResult result, out size_t length)Finish an asynchronous call started by [gio.datainputstream.DataInputStream.readLineAsync].
string readLineUtf8(out size_t length, gio.cancellable.Cancellable cancellable = null)Reads a UTF-8 encoded line from the data input stream.
ushort readUint16(gio.cancellable.Cancellable cancellable = null)Reads an unsigned 16-bit/2-byte value from stream.
uint readUint32(gio.cancellable.Cancellable cancellable = null)Reads an unsigned 32-bit/4-byte value from stream.
ulong readUint64(gio.cancellable.Cancellable cancellable = null)Reads an unsigned 64-bit/8-byte value from stream.
string readUntil(string stopChars, out size_t length, gio.cancellable.Cancellable cancellable = null)Reads a string from the data input stream, up to the first occurrence of any of the stop characters.
void readUntilAsync(string stopChars, int ioPriority, gio.cancellable.Cancellable cancellable = null, gio.types.AsyncReadyCallback callback = null)The asynchronous version of [gio.datainputstream.DataInputStream.readUntil]. It is an error to have two outstanding calls to this function.
string readUntilFinish(gio.async_result.AsyncResult result, out size_t length)Finish an asynchronous call started by [gio.datainputstream.DataInputStream.readUntilAsync].
string readUpto(string stopChars, out size_t length, gio.cancellable.Cancellable cancellable = null)Reads a string from the data input stream, up to the first occurrence of any of the stop characters.
void readUptoAsync(string stopChars, int ioPriority, gio.cancellable.Cancellable cancellable = null, gio.types.AsyncReadyCallback callback = null)The asynchronous version of [gio.datainputstream.DataInputStream.readUpto]. It is an error to have two outstanding calls to this function.
string readUptoFinish(gio.async_result.AsyncResult result, out size_t length)Finish an asynchronous call started by [gio.datainputstream.DataInputStream.readUptoAsync].
void setByteOrder(gio.types.DataStreamByteOrder order)This function sets the byte order for the given stream. All subsequent reads from the stream will be read in the given order.
void setNewlineType(gio.types.DataStreamNewlineType type)Sets the newline type for the stream.
Constructors
this(void * ptr, Flag!"Take" take)
this(gio.input_stream.InputStream baseStream)Creates a new data input stream for the base_stream.
Methods
T byteOrder(gio.types.DataStreamByteOrder propval)Set `byteOrder` property. Params: propval = The :byte-order property determines the byte ordering that is used when reading multi-byte entities (such as integers) from the stream. Returns: Builder ...
T newlineType(gio.types.DataStreamNewlineType propval)Set `newlineType` property. Params: propval = The :newline-type property determines what is considered as a line ending when reading complete lines from the stream. Returns: Builder instance for fl...

Fluent builder for [gio.data_input_stream.DataInputStream]