DataOutputStream

Data output stream implements #GOutputStream and includes functions for writing data directly to an output stream.

Constructors

this
this(GDataOutputStream* gDataOutputStream, bool ownedRef)

Sets our main struct and passes it to the parent class.

this
this(OutputStream baseStream)

Creates a new data output stream for @base_stream.

Members

Functions

getByteOrder
GDataStreamByteOrder getByteOrder()

Gets the byte order for the stream.

getDataOutputStreamStruct
GDataOutputStream* getDataOutputStreamStruct()

Get the main Gtk struct

getStruct
void* getStruct()

the main Gtk struct as a void*

putByte
bool putByte(char data, Cancellable cancellable)

Puts a byte into the output stream.

putInt16
bool putInt16(short data, Cancellable cancellable)

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

putInt32
bool putInt32(int data, Cancellable cancellable)

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

putInt64
bool putInt64(long data, Cancellable cancellable)

Puts a signed 64-bit integer into the stream.

putString
bool putString(string str, Cancellable cancellable)

Puts a string into the output stream.

putUint16
bool putUint16(ushort data, Cancellable cancellable)

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

putUint32
bool putUint32(uint data, Cancellable cancellable)

Puts an unsigned 32-bit integer into the stream.

putUint64
bool putUint64(ulong data, Cancellable cancellable)

Puts an unsigned 64-bit integer into the stream.

setByteOrder
void setByteOrder(GDataStreamByteOrder order)

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

setStruct
void setStruct(GObject* obj)
Undocumented in source. Be warned that the author may not have intended to support it.

Mixins

__anonymous
mixin SeekableT!(GDataOutputStream)
Undocumented in source.

Static functions

getType
GType getType()

Variables

gDataOutputStream
GDataOutputStream* gDataOutputStream;

the main Gtk struct

Inherited Members

From FilterOutputStream

gFilterOutputStream
GFilterOutputStream* gFilterOutputStream;

the main Gtk struct

getFilterOutputStreamStruct
GFilterOutputStream* getFilterOutputStreamStruct()

Get the main Gtk struct

getStruct
void* getStruct()

the main Gtk struct as a void*

setStruct
void setStruct(GObject* obj)
Undocumented in source. Be warned that the author may not have intended to support it.
getType
GType getType()
getBaseStream
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 SeekableIF

getSeekableStruct
GSeekable* getSeekableStruct()

Get the main Gtk struct

getStruct
void* getStruct()

the main Gtk struct as a void*

canSeek
bool canSeek()

Tests if the stream supports the #GSeekableIface.

canTruncate
bool canTruncate()

Tests if the stream can be truncated.

seek
bool seek(long offset, GSeekType type, 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, Cancellable cancellable)

Truncates a stream with a given #offset.

Meta