Class DataOutputStream

All Implemented Interfaces:
PointerInterface

public class DataOutputStream extends FilterOutputStream
Data output stream implements #GOutputStream and includes functions for
writing data directly to an output stream.

https://docs.gtk.org/gio/class.DataOutputStream.html

  • Constructor Details

    • DataOutputStream

      public DataOutputStream(PointerContainer pointer)
    • DataOutputStream

      public DataOutputStream(@Nonnull OutputStream base_stream)
      Creates a new data output stream for @base_stream.
      Parameters:
      base_stream - a #GOutputStream.
  • Method Details

    • getClassHandler

      public static ClassHandler getClassHandler()
    • getByteOrder

      public int getByteOrder()
      Gets the byte order for the stream.
      Returns:
      the #GDataStreamByteOrder for the @stream.
    • putInt16

      public boolean putInt16(int data, @Nullable Cancellable cancellable) throws AllocationError
      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

      public boolean putInt32(int data, @Nullable Cancellable cancellable) throws AllocationError
      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

      public boolean putInt64(long data, @Nullable Cancellable cancellable) throws AllocationError
      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

      public boolean putString(String 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
    • putUint16

      public boolean putUint16(int data, @Nullable Cancellable cancellable) throws AllocationError
      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

      public boolean putUint32(int data, @Nullable Cancellable cancellable) throws AllocationError
      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

      public boolean putUint64(long data, @Nullable Cancellable cancellable) throws AllocationError
      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

      public Seekable asSeekable()
      Implements interface Seekable. Call this to get access to interface functions.
      Returns:
      Seekable
    • getTypeID

      public static long getTypeID()
    • getParentTypeID

      public static long getParentTypeID()
    • getTypeSize

      public static TypeSystem.TypeSize getTypeSize()
    • getParentTypeSize

      public static TypeSystem.TypeSize getParentTypeSize()
    • getInstanceSize

      public static int getInstanceSize()