Class UnixOutputStream

All Implemented Interfaces:
PointerInterface

public class UnixOutputStream extends OutputStream
#GUnixOutputStream implements #GOutputStream for writing to a UNIX
file descriptor, including asynchronous operations. (If the file
descriptor refers to a socket or pipe, this will use poll() to do
asynchronous I/O. If it refers to a regular file, it will fall back
to doing asynchronous I/O in another thread.)

Note that `<gio/gunixoutputstream.h>` belongs to the UNIX-specific GIO
interfaces, thus you have to use the `gio-unix-2.0.pc` pkg-config file
when using it.

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

  • Constructor Details

    • UnixOutputStream

      public UnixOutputStream(PointerContainer pointer)
    • UnixOutputStream

      public UnixOutputStream(int fd, boolean close_fd)
      Creates a new #GUnixOutputStream for the given @fd.

      If @close_fd, is %TRUE, the file descriptor will be closed when
      the output stream is destroyed.
      Parameters:
      fd - a UNIX file descriptor
      close_fd - %TRUE to close the file descriptor when done
  • Method Details

    • getClassHandler

      public static ClassHandler getClassHandler()
    • getCloseFd

      public boolean getCloseFd()
      Returns whether the file descriptor of @stream will be
      closed when the stream is closed.
      Returns:
      %TRUE if the file descriptor is closed when done
    • getFd

      public int getFd()
      Return the UNIX file descriptor that the stream writes to.
      Returns:
      The file descriptor of @stream
    • setCloseFd

      public void setCloseFd(boolean close_fd)
      Sets whether the file descriptor of @stream shall be closed
      when the stream is closed.
      Parameters:
      close_fd - %TRUE to close the file descriptor when done
    • asFileDescriptorBased

      public FileDescriptorBased asFileDescriptorBased()
      Implements interface FileDescriptorBased. Call this to get access to interface functions.
      Returns:
      FileDescriptorBased
    • asPollableOutputStream

      public PollableOutputStream asPollableOutputStream()
      Implements interface PollableOutputStream. Call this to get access to interface functions.
      Returns:
      PollableOutputStream
    • 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()