Package ch.bailu.gtk.gio
Class DataOutputStream
java.lang.Object
ch.bailu.gtk.type.Type
ch.bailu.gtk.type.Pointer
ch.bailu.gtk.gobject.Object
ch.bailu.gtk.gio.OutputStream
ch.bailu.gtk.gio.FilterOutputStream
ch.bailu.gtk.gio.DataOutputStream
- All Implemented Interfaces:
PointerInterface
Data output stream implements #GOutputStream and includes functions for
writing data directly to an output stream.
writing data directly to an output stream.
-
Nested Class Summary
Nested classes/interfaces inherited from class ch.bailu.gtk.gio.OutputStream
OutputStream.OnAsyncReadyCallback
Nested classes/interfaces inherited from class ch.bailu.gtk.gobject.Object
Object.OnBindingTransformFunc, Object.OnDestroyNotify, Object.OnDuplicateFunc, Object.OnNotify, Object.OnToggleNotify, Object.OnWeakNotify
-
Field Summary
Fields inherited from class ch.bailu.gtk.gobject.Object
SIGNAL_ON_NOTIFY
-
Constructor Summary
ConstructorDescriptionDataOutputStream
(OutputStream base_stream) Creates a new data output stream for @base_stream.DataOutputStream
(PointerContainer pointer) -
Method Summary
Modifier and TypeMethodDescriptionImplements interfaceSeekable
.int
Gets the byte order for the stream.static ClassHandler
static int
static long
static TypeSystem.TypeSize
static long
static TypeSystem.TypeSize
boolean
putInt16
(int data, Cancellable cancellable) Puts a signed 16-bit integer into the output stream.boolean
putInt32
(int data, Cancellable cancellable) Puts a signed 32-bit integer into the output stream.boolean
putInt64
(long data, Cancellable cancellable) Puts a signed 64-bit integer into the stream.boolean
putString
(Str str, Cancellable cancellable) Puts a string into the output stream.boolean
putString
(String str, Cancellable cancellable) Puts a string into the output stream.boolean
putUint16
(int data, Cancellable cancellable) Puts an unsigned 16-bit integer into the output stream.boolean
putUint32
(int data, Cancellable cancellable) Puts an unsigned 32-bit integer into the stream.boolean
putUint64
(long data, Cancellable cancellable) Puts an unsigned 64-bit integer into the stream.void
setByteOrder
(int order) Sets the byte order of the data output stream to @order.Methods inherited from class ch.bailu.gtk.gio.FilterOutputStream
getBaseStream, getCloseBaseStream, setCloseBaseStream
Methods inherited from class ch.bailu.gtk.gio.OutputStream
clearPending, close, closeAsync, closeFinish, flush, flushAsync, flushFinish, hasPending, isClosed, isClosing, setPending, splice, spliceAsync, spliceFinish, write, writeAll, writeAllAsync, writeAllFinish, writeAsync, writeBytes, writeBytesAsync, writeBytesFinish, writeFinish, writevAllFinish, writevFinish
Methods inherited from class ch.bailu.gtk.gobject.Object
addToggleRef, bindProperty, bindProperty, bindPropertyFull, bindPropertyFull, bindPropertyWithClosures, bindPropertyWithClosures, compatControl, connect, connect, disconnect, disconnect, dupData, dupData, dupQdata, forceFloating, freezeNotify, get, get, getData, getData, getProperty, getProperty, getQdata, interfaceFindProperty, interfaceInstallProperty, isFloating, notify, notify, notifyByPspec, onNotify, ref, refSink, removeToggleRef, replaceData, replaceData, replaceQdata, runDispose, set, set, setData, setData, setDataFull, setDataFull, setProperty, setProperty, setQdata, setQdataFull, stealData, stealData, stealQdata, takeRef, thawNotify, unref, watchClosure, weakRef, weakUnref
Methods inherited from class ch.bailu.gtk.type.Pointer
asCPointer, cast, connectSignal, disconnectSignals, disconnectSignals, equals, hashCode, throwIfNull, throwNullPointerException, toString, unregisterCallbacks, unregisterCallbacks
Methods inherited from class ch.bailu.gtk.type.Type
asCPointer, asCPointer, asCPointerNotNull, asJnaPointer, asJnaPointer, asPointer, asPointer, cast, cast, throwIfNull
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface ch.bailu.gtk.type.PointerInterface
asCPointerNotNull, asJnaPointer, asPointer, isNotNull, isNull
-
Constructor Details
-
DataOutputStream
-
DataOutputStream
Creates a new data output stream for @base_stream.- Parameters:
base_stream
- a #GOutputStream.
-
-
Method Details
-
getClassHandler
-
getByteOrder
public int getByteOrder()Gets the byte order for the stream.- Returns:
- the #GDataStreamByteOrder for the @stream.
-
putInt16
Puts a signed 16-bit integer into the output stream.- Parameters:
data
- a #gint16.cancellable
- optional #GCancellable object, %NULL to ignore.- Returns:
- %TRUE if @data was successfully added to the @stream.
- Throws:
AllocationError
-
putInt32
Puts a signed 32-bit integer into the output stream.- Parameters:
data
- a #gint32.cancellable
- optional #GCancellable object, %NULL to ignore.- Returns:
- %TRUE if @data was successfully added to the @stream.
- Throws:
AllocationError
-
putInt64
Puts a signed 64-bit integer into the stream.- Parameters:
data
- a #gint64.cancellable
- optional #GCancellable object, %NULL to ignore.- Returns:
- %TRUE if @data was successfully added to the @stream.
- Throws:
AllocationError
-
putString
public boolean putString(@Nonnull Str str, @Nullable Cancellable cancellable) throws AllocationError Puts a string into the output stream.- Parameters:
str
- a string.cancellable
- optional #GCancellable object, %NULL to ignore.- Returns:
- %TRUE if @string was successfully added to the @stream.
- Throws:
AllocationError
-
putString
Puts a string into the output stream.- Parameters:
str
- a string.cancellable
- optional #GCancellable object, %NULL to ignore.- Returns:
- %TRUE if @string was successfully added to the @stream.
- Throws:
AllocationError
-
putUint16
Puts an unsigned 16-bit integer into the output stream.- Parameters:
data
- a #guint16.cancellable
- optional #GCancellable object, %NULL to ignore.- Returns:
- %TRUE if @data was successfully added to the @stream.
- Throws:
AllocationError
-
putUint32
Puts an unsigned 32-bit integer into the stream.- Parameters:
data
- a #guint32.cancellable
- optional #GCancellable object, %NULL to ignore.- Returns:
- %TRUE if @data was successfully added to the @stream.
- Throws:
AllocationError
-
putUint64
Puts an unsigned 64-bit integer into the stream.- Parameters:
data
- a #guint64.cancellable
- optional #GCancellable object, %NULL to ignore.- Returns:
- %TRUE if @data was successfully added to the @stream.
- Throws:
AllocationError
-
setByteOrder
public void setByteOrder(int order) Sets the byte order of the data output stream to @order.- Parameters:
order
- a %GDataStreamByteOrder.
-
asSeekable
Implements interfaceSeekable
. Call this to get access to interface functions.- Returns:
Seekable
-
getTypeID
public static long getTypeID() -
getParentTypeID
public static long getParentTypeID() -
getTypeSize
-
getParentTypeSize
-
getInstanceSize
public static int getInstanceSize()
-