Package ch.bailu.gtk.gio
Klasse FileOutputStream
java.lang.Object
ch.bailu.gtk.type.Type
ch.bailu.gtk.type.Pointer
ch.bailu.gtk.gobject.Object
ch.bailu.gtk.type.PropertyHolder
ch.bailu.gtk.gio.OutputStream
ch.bailu.gtk.gio.FileOutputStream
- Alle implementierten Schnittstellen:
PointerInterface
`GFileOutputStream` provides output streams that write their
content to a file.
`GFileOutputStream` implements [iface@Gio.Seekable], which allows the output
stream to jump to arbitrary positions in the file and to truncate
the file, provided the filesystem of the file supports these
operations.
To find the position of a file output stream, use [method@Gio.Seekable.tell].
To find out if a file output stream supports seeking, use
[method@Gio.Seekable.can_seek].To position a file output stream, use
[method@Gio.Seekable.seek]. To find out if a file output stream supports
truncating, use [method@Gio.Seekable.can_truncate]. To truncate a file output
stream, use [method@Gio.Seekable.truncate].
content to a file.
`GFileOutputStream` implements [iface@Gio.Seekable], which allows the output
stream to jump to arbitrary positions in the file and to truncate
the file, provided the filesystem of the file supports these
operations.
To find the position of a file output stream, use [method@Gio.Seekable.tell].
To find out if a file output stream supports seeking, use
[method@Gio.Seekable.can_seek].To position a file output stream, use
[method@Gio.Seekable.seek]. To find out if a file output stream supports
truncating, use [method@Gio.Seekable.can_truncate]. To truncate a file output
stream, use [method@Gio.Seekable.truncate].
-
Verschachtelte Klassen - Übersicht
Verschachtelte KlassenVon Klasse geerbte verschachtelte Klassen/Schnittstellen ch.bailu.gtk.gobject.Object
Object.OnBindingTransformFunc, Object.OnDestroyNotify, Object.OnDuplicateFunc, Object.OnNotify, Object.OnToggleNotify, Object.OnWeakNotify
-
Feldübersicht
Von Klasse geerbte Felder ch.bailu.gtk.gobject.Object
SIGNAL_ON_NOTIFY
-
Konstruktorübersicht
Konstruktoren -
Methodenübersicht
Modifizierer und TypMethodeBeschreibungImplements interfaceSeekable
.static ClassHandler
getEtag()
Gets the entity tag for the file when it has been written.static int
static long
static TypeSystem.TypeSize
static long
static TypeSystem.TypeSize
queryInfo
(Str attributes, Cancellable cancellable) Queries a file output stream for the given @attributes.queryInfo
(String attributes, Cancellable cancellable) Queries a file output stream for the given @attributes.void
queryInfoAsync
(Str attributes, int io_priority, Cancellable cancellable, FileOutputStream.OnAsyncReadyCallback callback, Pointer user_data) Asynchronously queries the @stream for a #GFileInfo.void
queryInfoAsync
(String attributes, int io_priority, Cancellable cancellable, FileOutputStream.OnAsyncReadyCallback callback, Pointer user_data) Asynchronously queries the @stream for a #GFileInfo.queryInfoFinish
(AsyncResult result) Finalizes the asynchronous query started
by g_file_output_stream_query_info_async().Von Klasse geerbte Methoden 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
Von Klasse geerbte Methoden ch.bailu.gtk.type.PropertyHolder
getBooleanProperty, getIntProperty, getObjectProperty, getStringProperty, getStrProperty, setBooleanProperty, setIntProperty, setObjectProperty, setStringProperty, setStrProperty
Von Klasse geerbte Methoden 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
Von Klasse geerbte Methoden ch.bailu.gtk.type.Pointer
asCPointer, cast, connectSignal, disconnectSignals, disconnectSignals, equals, hashCode, throwIfNull, throwNullPointerException, toString, unregisterCallbacks, unregisterCallbacks
Von Klasse geerbte Methoden ch.bailu.gtk.type.Type
asCPointer, asCPointer, asCPointerNotNull, asJnaPointer, asJnaPointer, asPointer, asPointer, cast, cast, throwIfNull
Von Klasse geerbte Methoden java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Von Schnittstelle geerbte Methoden ch.bailu.gtk.type.PointerInterface
asCPointerNotNull, asJnaPointer, asPointer, isNotNull, isNull
-
Konstruktordetails
-
FileOutputStream
-
-
Methodendetails
-
getClassHandler
-
getEtag
Gets the entity tag for the file when it has been written.
This must be called after the stream has been written
and closed, as the etag can change while writing.- Gibt zurück:
- the entity tag for the stream.
-
queryInfo
public FileInfo queryInfo(@Nonnull Str attributes, @Nullable Cancellable cancellable) throws AllocationError Queries a file output stream for the given @attributes.
This function blocks while querying the stream. For the asynchronous
version of this function, see g_file_output_stream_query_info_async().
While the stream is blocked, the stream will set the pending flag
internally, and any other operations on the stream will fail with
%G_IO_ERROR_PENDING.
Can fail if the stream was already closed (with @error being set to
%G_IO_ERROR_CLOSED), the stream has pending operations (with @error being
set to %G_IO_ERROR_PENDING), or if querying info is not supported for
the stream's interface (with @error being set to %G_IO_ERROR_NOT_SUPPORTED). In
all cases of failure, %NULL will be returned.
If @cancellable is not %NULL, then the operation can be cancelled by
triggering the cancellable object from another thread. If the operation
was cancelled, the error %G_IO_ERROR_CANCELLED will be set, and %NULL will
be returned.- Parameter:
attributes
- a file attribute query string.cancellable
- optional #GCancellable object, %NULL to ignore.- Gibt zurück:
- a #GFileInfo for the @stream, or %NULL on error.
- Löst aus:
AllocationError
-
queryInfo
public FileInfo queryInfo(String attributes, @Nullable Cancellable cancellable) throws AllocationError Queries a file output stream for the given @attributes.
This function blocks while querying the stream. For the asynchronous
version of this function, see g_file_output_stream_query_info_async().
While the stream is blocked, the stream will set the pending flag
internally, and any other operations on the stream will fail with
%G_IO_ERROR_PENDING.
Can fail if the stream was already closed (with @error being set to
%G_IO_ERROR_CLOSED), the stream has pending operations (with @error being
set to %G_IO_ERROR_PENDING), or if querying info is not supported for
the stream's interface (with @error being set to %G_IO_ERROR_NOT_SUPPORTED). In
all cases of failure, %NULL will be returned.
If @cancellable is not %NULL, then the operation can be cancelled by
triggering the cancellable object from another thread. If the operation
was cancelled, the error %G_IO_ERROR_CANCELLED will be set, and %NULL will
be returned.- Parameter:
attributes
- a file attribute query string.cancellable
- optional #GCancellable object, %NULL to ignore.- Gibt zurück:
- a #GFileInfo for the @stream, or %NULL on error.
- Löst aus:
AllocationError
-
queryInfoAsync
public void queryInfoAsync(@Nonnull Str attributes, int io_priority, @Nullable Cancellable cancellable, FileOutputStream.OnAsyncReadyCallback callback, @Nullable Pointer user_data) Asynchronously queries the @stream for a #GFileInfo. When completed,
@callback will be called with a #GAsyncResult which can be used to
finish the operation with g_file_output_stream_query_info_finish().
For the synchronous version of this function, see
g_file_output_stream_query_info().- Parameter:
attributes
- a file attribute query string.io_priority
- the [I/O priority](iface.AsyncResult.html#io-priority) of the requestcancellable
- optional #GCancellable object, %NULL to ignore.callback
- callback to call when the request is satisfieduser_data
- the data to pass to callback function
-
queryInfoAsync
public void queryInfoAsync(String attributes, int io_priority, @Nullable Cancellable cancellable, FileOutputStream.OnAsyncReadyCallback callback, @Nullable Pointer user_data) Asynchronously queries the @stream for a #GFileInfo. When completed,
@callback will be called with a #GAsyncResult which can be used to
finish the operation with g_file_output_stream_query_info_finish().
For the synchronous version of this function, see
g_file_output_stream_query_info().- Parameter:
attributes
- a file attribute query string.io_priority
- the [I/O priority](iface.AsyncResult.html#io-priority) of the requestcancellable
- optional #GCancellable object, %NULL to ignore.callback
- callback to call when the request is satisfieduser_data
- the data to pass to callback function
-
queryInfoFinish
Finalizes the asynchronous query started
by g_file_output_stream_query_info_async().- Parameter:
result
- a #GAsyncResult.- Gibt zurück:
- A #GFileInfo for the finished query.
- Löst aus:
AllocationError
-
asSeekable
Implements interfaceSeekable
. Call this to get access to interface functions.- Gibt zurück:
Seekable
-
getTypeID
public static long getTypeID() -
getParentTypeID
public static long getParentTypeID() -
getTypeSize
-
getParentTypeSize
-
getInstanceSize
public static int getInstanceSize()
-