DataOutputStream

Data output stream implements gio.output_stream.OutputStream and includes functions for writing data directly to an output stream.

Constructors

this
this(gio.output_stream.OutputStream baseStream)

Creates a new data output stream for base_stream.

Members

Functions

getByteOrder
gio.types.DataStreamByteOrder getByteOrder()

Gets the byte order for the stream.

putByte
bool putByte(ubyte data, gio.cancellable.Cancellable cancellable)

Puts a byte into the output stream.

putInt16
bool putInt16(short data, gio.cancellable.Cancellable cancellable)

Puts a signed 16-bit integer into the output stream.

putInt32
bool putInt32(int data, gio.cancellable.Cancellable cancellable)

Puts a signed 32-bit integer into the output stream.

putInt64
bool putInt64(long data, gio.cancellable.Cancellable cancellable)

Puts a signed 64-bit integer into the stream.

putString
bool putString(string str, gio.cancellable.Cancellable cancellable)

Puts a string into the output stream.

putUint16
bool putUint16(ushort data, gio.cancellable.Cancellable cancellable)

Puts an unsigned 16-bit integer into the output stream.

putUint32
bool putUint32(uint data, gio.cancellable.Cancellable cancellable)

Puts an unsigned 32-bit integer into the stream.

putUint64
bool putUint64(ulong data, gio.cancellable.Cancellable cancellable)

Puts an unsigned 64-bit integer into the stream.

setByteOrder
void setByteOrder(gio.types.DataStreamByteOrder order)

Sets the byte order of the data output stream to order.

Mixed In Members

From mixin SeekableT!()

canSeek
bool canSeek()

Tests if the stream supports the #GSeekableIface.

canTruncate
bool canTruncate()

Tests if the length of the stream can be adjusted with gio.seekable.Seekable.truncate.

seek
bool seek(long offset, glib.types.SeekType type, gio.cancellable.Cancellable cancellable)

Seeks in the stream by the given offset, modified by type.

tell
long tell()

Tells the current position within the stream.

truncate
bool truncate(long offset, gio.cancellable.Cancellable cancellable)

Sets the length of the stream to offset. If the stream was previously larger than offset, the extra data is discarded. If the stream was previously shorter than offset, it is extended with NUL ('\0') bytes.

Inherited Members

From FilterOutputStream

getBaseStream
gio.output_stream.OutputStream getBaseStream()

Gets the base stream for the filter stream.

getCloseBaseStream
bool getCloseBaseStream()

Returns whether the base stream will be closed when stream is closed.

setCloseBaseStream
void setCloseBaseStream(bool closeBase)

Sets whether the base stream will be closed when stream is closed.

From Seekable

canSeek
bool canSeek()

Tests if the stream supports the #GSeekableIface.

canTruncate
bool canTruncate()

Tests if the length of the stream can be adjusted with gio.seekable.Seekable.truncate.

seek
bool seek(long offset, glib.types.SeekType type, gio.cancellable.Cancellable cancellable)

Seeks in the stream by the given offset, modified by type.

tell
long tell()

Tells the current position within the stream.

truncate
bool truncate(long offset, gio.cancellable.Cancellable cancellable)

Sets the length of the stream to offset. If the stream was previously larger than offset, the extra data is discarded. If the stream was previously shorter than offset, it is extended with NUL ('\0') bytes.