Package org.gnome.glib
Class UnixPipe
java.lang.Object
org.javagi.base.ProxyInstance
org.gnome.glib.UnixPipe
- All Implemented Interfaces:
Proxy
A Unix pipe. The advantage of this type over
int[2] is that it can
be closed automatically when it goes out of scope, using g_auto(GUnixPipe),
on compilers that support that feature.- Since:
- 2.80
-
Constructor Summary
ConstructorsConstructorDescriptionUnixPipe()Allocate a new UnixPipe.UnixPipe(int[] fds) Allocate a new UnixPipe with the fields set to the provided values.Allocate a new UnixPipe with the fields set to the provided values.Allocate a new UnixPipe.UnixPipe(MemorySegment address) Create a UnixPipe proxy instance for the provided memory address. -
Method Summary
Modifier and TypeMethodDescriptionstatic MemoryLayoutThe memory layout of the native struct.@org.jspecify.annotations.Nullable int @Nullable []readFds()Read the value of the fieldfds.voidWrite a value in the fieldfds.Methods inherited from class org.javagi.base.ProxyInstance
equals, handle, hashCode
-
Constructor Details
-
UnixPipe
Create a UnixPipe proxy instance for the provided memory address.- Parameters:
address- the memory address of the native object
-
UnixPipe
Allocate a new UnixPipe.- Parameters:
arena- to control the memory allocation scope
-
UnixPipe
public UnixPipe()Allocate a new UnixPipe. The memory is allocated withArena.ofAuto(). -
UnixPipe
Allocate a new UnixPipe with the fields set to the provided values.- Parameters:
fds- value for the fieldfdsarena- to control the memory allocation scope
-
UnixPipe
public UnixPipe(int[] fds) Allocate a new UnixPipe with the fields set to the provided values. The memory is allocated withArena.ofAuto().- Parameters:
fds- value for the fieldfds
-
-
Method Details
-
getMemoryLayout
The memory layout of the native struct.- Returns:
- the memory layout
-
readFds
public @org.jspecify.annotations.Nullable int @Nullable [] readFds()Read the value of the fieldfds.- Returns:
- The value of the field
fds
-
writeFds
Write a value in the fieldfds.- Parameters:
fds- The new value for the fieldfds
-