public class oadd.io.netty.channel.unix.FileDescriptor extends java.lang.Object
{
private static final java.util.concurrent.atomic.AtomicIntegerFieldUpdater stateUpdater;
private static final int STATE_CLOSED_MASK;
private static final int STATE_INPUT_SHUTDOWN_MASK;
private static final int STATE_OUTPUT_SHUTDOWN_MASK;
private static final int STATE_ALL_MASK;
volatile int state;
final int fd;
public void <init>(int)
{
int v;
oadd.io.netty.channel.unix.FileDescriptor v;
v := @this: oadd.io.netty.channel.unix.FileDescriptor;
v := @parameter: int;
specialinvoke v.<java.lang.Object: void <init>()>();
staticinvoke <oadd.io.netty.util.internal.ObjectUtil: int checkPositiveOrZero(int,java.lang.String)>(v, "fd");
v.<oadd.io.netty.channel.unix.FileDescriptor: int fd> = v;
return;
}
public final int intValue()
{
int v;
oadd.io.netty.channel.unix.FileDescriptor v;
v := @this: oadd.io.netty.channel.unix.FileDescriptor;
v = v.<oadd.io.netty.channel.unix.FileDescriptor: int fd>;
return v;
}
protected boolean markClosed()
{
int v, v;
oadd.io.netty.channel.unix.FileDescriptor v;
boolean v, v;
v := @this: oadd.io.netty.channel.unix.FileDescriptor;
label:
v = v.<oadd.io.netty.channel.unix.FileDescriptor: int state>;
v = staticinvoke <oadd.io.netty.channel.unix.FileDescriptor: boolean isClosed(int)>(v);
if v == 0 goto label;
return 0;
label:
v = v | 7;
v = virtualinvoke v.<oadd.io.netty.channel.unix.FileDescriptor: boolean casState(int,int)>(v, v);
if v == 0 goto label;
return 1;
}
public void close() throws java.io.IOException
{
int v, v;
oadd.io.netty.channel.unix.Errors$NativeIoException v;
oadd.io.netty.channel.unix.FileDescriptor v;
boolean v;
v := @this: oadd.io.netty.channel.unix.FileDescriptor;
v = virtualinvoke v.<oadd.io.netty.channel.unix.FileDescriptor: boolean markClosed()>();
if v == 0 goto label;
v = v.<oadd.io.netty.channel.unix.FileDescriptor: int fd>;
v = staticinvoke <oadd.io.netty.channel.unix.FileDescriptor: int close(int)>(v);
if v >= 0 goto label;
v = staticinvoke <oadd.io.netty.channel.unix.Errors: oadd.io.netty.channel.unix.Errors$NativeIoException newIOException(java.lang.String,int)>("close", v);
throw v;
label:
return;
}
public boolean isOpen()
{
int v;
oadd.io.netty.channel.unix.FileDescriptor v;
boolean v, v;
v := @this: oadd.io.netty.channel.unix.FileDescriptor;
v = v.<oadd.io.netty.channel.unix.FileDescriptor: int state>;
v = staticinvoke <oadd.io.netty.channel.unix.FileDescriptor: boolean isClosed(int)>(v);
if v != 0 goto label;
v = 1;
goto label;
label:
v = 0;
label:
return v;
}
public final int write(java.nio.ByteBuffer, int, int) throws java.io.IOException
{
int v, v, v, v, v;
oadd.io.netty.channel.unix.FileDescriptor v;
java.nio.ByteBuffer v;
v := @this: oadd.io.netty.channel.unix.FileDescriptor;
v := @parameter: java.nio.ByteBuffer;
v := @parameter: int;
v := @parameter: int;
v = v.<oadd.io.netty.channel.unix.FileDescriptor: int fd>;
v = staticinvoke <oadd.io.netty.channel.unix.FileDescriptor: int write(int,java.nio.ByteBuffer,int,int)>(v, v, v, v);
if v < 0 goto label;
return v;
label:
v = staticinvoke <oadd.io.netty.channel.unix.Errors: int ioResult(java.lang.String,int)>("write", v);
return v;
}
public final int writeAddress(long, int, int) throws java.io.IOException
{
int v, v, v, v, v;
long v;
oadd.io.netty.channel.unix.FileDescriptor v;
v := @this: oadd.io.netty.channel.unix.FileDescriptor;
v := @parameter: long;
v := @parameter: int;
v := @parameter: int;
v = v.<oadd.io.netty.channel.unix.FileDescriptor: int fd>;
v = staticinvoke <oadd.io.netty.channel.unix.FileDescriptor: int writeAddress(int,long,int,int)>(v, v, v, v);
if v < 0 goto label;
return v;
label:
v = staticinvoke <oadd.io.netty.channel.unix.Errors: int ioResult(java.lang.String,int)>("writeAddress", v);
return v;
}
public final long writev(java.nio.ByteBuffer[], int, int, long) throws java.io.IOException
{
java.nio.ByteBuffer[] v;
long v, v;
byte v;
int v, v, v, v, v, v;
oadd.io.netty.channel.unix.FileDescriptor v;
v := @this: oadd.io.netty.channel.unix.FileDescriptor;
v := @parameter: java.nio.ByteBuffer[];
v := @parameter: int;
v := @parameter: int;
v := @parameter: long;
v = v.<oadd.io.netty.channel.unix.FileDescriptor: int fd>;
v = <oadd.io.netty.channel.unix.Limits: int IOV_MAX>;
v = staticinvoke <java.lang.Math: int min(int,int)>(v, v);
v = staticinvoke <oadd.io.netty.channel.unix.FileDescriptor: long writev(int,java.nio.ByteBuffer[],int,int,long)>(v, v, v, v, v);
v = v cmp 0L;
if v < 0 goto label;
return v;
label:
v = staticinvoke <oadd.io.netty.channel.unix.Errors: int ioResult(java.lang.String,int)>("writev", v);
return v;
}
public final long writevAddresses(long, int) throws java.io.IOException
{
byte v;
int v, v, v;
long v, v;
oadd.io.netty.channel.unix.FileDescriptor v;
v := @this: oadd.io.netty.channel.unix.FileDescriptor;
v := @parameter: long;
v := @parameter: int;
v = v.<oadd.io.netty.channel.unix.FileDescriptor: int fd>;
v = staticinvoke <oadd.io.netty.channel.unix.FileDescriptor: long writevAddresses(int,long,int)>(v, v, v);
v = v cmp 0L;
if v < 0 goto label;
return v;
label:
v = staticinvoke <oadd.io.netty.channel.unix.Errors: int ioResult(java.lang.String,int)>("writevAddresses", v);
return v;
}
public final int read(java.nio.ByteBuffer, int, int) throws java.io.IOException
{
java.nio.ByteBuffer v;
int v, v, v, v, v, v;
oadd.io.netty.channel.unix.FileDescriptor v;
v := @this: oadd.io.netty.channel.unix.FileDescriptor;
v := @parameter: java.nio.ByteBuffer;
v := @parameter: int;
v := @parameter: int;
v = v.<oadd.io.netty.channel.unix.FileDescriptor: int fd>;
v = staticinvoke <oadd.io.netty.channel.unix.FileDescriptor: int read(int,java.nio.ByteBuffer,int,int)>(v, v, v, v);
if v <= 0 goto label;
return v;
label:
if v != 0 goto label;
v = (int) -1;
return v;
label:
v = staticinvoke <oadd.io.netty.channel.unix.Errors: int ioResult(java.lang.String,int)>("read", v);
return v;
}
public final int readAddress(long, int, int) throws java.io.IOException
{
long v;
int v, v, v, v, v, v;
oadd.io.netty.channel.unix.FileDescriptor v;
v := @this: oadd.io.netty.channel.unix.FileDescriptor;
v := @parameter: long;
v := @parameter: int;
v := @parameter: int;
v = v.<oadd.io.netty.channel.unix.FileDescriptor: int fd>;
v = staticinvoke <oadd.io.netty.channel.unix.FileDescriptor: int readAddress(int,long,int,int)>(v, v, v, v);
if v <= 0 goto label;
return v;
label:
if v != 0 goto label;
v = (int) -1;
return v;
label:
v = staticinvoke <oadd.io.netty.channel.unix.Errors: int ioResult(java.lang.String,int)>("readAddress", v);
return v;
}
public java.lang.String toString()
{
int v;
java.lang.String v;
oadd.io.netty.channel.unix.FileDescriptor v;
v := @this: oadd.io.netty.channel.unix.FileDescriptor;
v = v.<oadd.io.netty.channel.unix.FileDescriptor: int fd>;
v = dynamicinvoke "makeConcatWithConstants" <java.lang.String (int)>(v) <java.lang.invoke.StringConcatFactory: java.lang.invoke.CallSite makeConcatWithConstants(java.lang.invoke.MethodHandles$Lookup,java.lang.String,java.lang.invoke.MethodType,java.lang.String,java.lang.Object[])>("FileDescriptor{fd=\u0001}");
return v;
}
public boolean equals(java.lang.Object)
{
int v, v;
java.lang.Object v;
oadd.io.netty.channel.unix.FileDescriptor v;
boolean v, v;
v := @this: oadd.io.netty.channel.unix.FileDescriptor;
v := @parameter: java.lang.Object;
if v != v goto label;
return 1;
label:
v = v instanceof oadd.io.netty.channel.unix.FileDescriptor;
if v != 0 goto label;
return 0;
label:
v = v.<oadd.io.netty.channel.unix.FileDescriptor: int fd>;
v = v.<oadd.io.netty.channel.unix.FileDescriptor: int fd>;
if v != v goto label;
v = 1;
goto label;
label:
v = 0;
label:
return v;
}
public int hashCode()
{
int v;
oadd.io.netty.channel.unix.FileDescriptor v;
v := @this: oadd.io.netty.channel.unix.FileDescriptor;
v = v.<oadd.io.netty.channel.unix.FileDescriptor: int fd>;
return v;
}
public static oadd.io.netty.channel.unix.FileDescriptor 'from'(java.lang.String) throws java.io.IOException
{
int v;
java.lang.Object v;
oadd.io.netty.channel.unix.Errors$NativeIoException v;
java.lang.String v;
oadd.io.netty.channel.unix.FileDescriptor v;
v := @parameter: java.lang.String;
v = staticinvoke <oadd.io.netty.util.internal.ObjectUtil: java.lang.Object checkNotNull(java.lang.Object,java.lang.String)>(v, "path");
v = staticinvoke <oadd.io.netty.channel.unix.FileDescriptor: int open(java.lang.String)>(v);
if v >= 0 goto label;
v = staticinvoke <oadd.io.netty.channel.unix.Errors: oadd.io.netty.channel.unix.Errors$NativeIoException newIOException(java.lang.String,int)>("open", v);
throw v;
label:
v = new oadd.io.netty.channel.unix.FileDescriptor;
specialinvoke v.<oadd.io.netty.channel.unix.FileDescriptor: void <init>(int)>(v);
return v;
}
public static oadd.io.netty.channel.unix.FileDescriptor 'from'(java.io.File) throws java.io.IOException
{
java.lang.Object v;
java.lang.String v;
oadd.io.netty.channel.unix.FileDescriptor v;
java.io.File v;
v := @parameter: java.io.File;
v = staticinvoke <oadd.io.netty.util.internal.ObjectUtil: java.lang.Object checkNotNull(java.lang.Object,java.lang.String)>(v, "file");
v = virtualinvoke v.<java.io.File: java.lang.String getPath()>();
v = staticinvoke <oadd.io.netty.channel.unix.FileDescriptor: oadd.io.netty.channel.unix.FileDescriptor 'from'(java.lang.String)>(v);
return v;
}
public static oadd.io.netty.channel.unix.FileDescriptor[] pipe() throws java.io.IOException
{
byte v;
long v, v;
oadd.io.netty.channel.unix.Errors$NativeIoException v;
oadd.io.netty.channel.unix.FileDescriptor v, v;
oadd.io.netty.channel.unix.FileDescriptor[] v;
v = staticinvoke <oadd.io.netty.channel.unix.FileDescriptor: long newPipe()>();
v = v cmp 0L;
if v >= 0 goto label;
v = staticinvoke <oadd.io.netty.channel.unix.Errors: oadd.io.netty.channel.unix.Errors$NativeIoException newIOException(java.lang.String,int)>("newPipe", v);
throw v;
label:
v = newarray (oadd.io.netty.channel.unix.FileDescriptor)[2];
v = new oadd.io.netty.channel.unix.FileDescriptor;
v = v >>> 32;
specialinvoke v.<oadd.io.netty.channel.unix.FileDescriptor: void <init>(int)>(v);
v[0] = v;
v = new oadd.io.netty.channel.unix.FileDescriptor;
specialinvoke v.<oadd.io.netty.channel.unix.FileDescriptor: void <init>(int)>(v);
v[1] = v;
return v;
}
final boolean casState(int, int)
{
java.util.concurrent.atomic.AtomicIntegerFieldUpdater v;
int v, v;
oadd.io.netty.channel.unix.FileDescriptor v;
boolean v;
v := @this: oadd.io.netty.channel.unix.FileDescriptor;
v := @parameter: int;
v := @parameter: int;
v = <oadd.io.netty.channel.unix.FileDescriptor: java.util.concurrent.atomic.AtomicIntegerFieldUpdater stateUpdater>;
v = virtualinvoke v.<java.util.concurrent.atomic.AtomicIntegerFieldUpdater: boolean compareAndSet(java.lang.Object,int,int)>(v, v, v);
return v;
}
static boolean isClosed(int)
{
int v, v;
boolean v;
v := @parameter: int;
v = v & 1;
if v == 0 goto label;
v = 1;
goto label;
label:
v = 0;
label:
return v;
}
static boolean isInputShutdown(int)
{
int v, v;
boolean v;
v := @parameter: int;
v = v & 2;
if v == 0 goto label;
v = 1;
goto label;
label:
v = 0;
label:
return v;
}
static boolean isOutputShutdown(int)
{
int v, v;
boolean v;
v := @parameter: int;
v = v & 4;
if v == 0 goto label;
v = 1;
goto label;
label:
v = 0;
label:
return v;
}
static int inputShutdown(int)
{
int v, v;
v := @parameter: int;
v = v | 2;
return v;
}
static int outputShutdown(int)
{
int v, v;
v := @parameter: int;
v = v | 4;
return v;
}
private static native int open(java.lang.String);
private static native int close(int);
private static native int write(int, java.nio.ByteBuffer, int, int);
private static native int writeAddress(int, long, int, int);
private static native long writev(int, java.nio.ByteBuffer[], int, int, long);
private static native long writevAddresses(int, long, int);
private static native int read(int, java.nio.ByteBuffer, int, int);
private static native int readAddress(int, long, int, int);
private static native long newPipe();
static void <clinit>()
{
java.util.concurrent.atomic.AtomicIntegerFieldUpdater v;
v = staticinvoke <java.util.concurrent.atomic.AtomicIntegerFieldUpdater: java.util.concurrent.atomic.AtomicIntegerFieldUpdater newUpdater(java.lang.Class,java.lang.String)>(class "Loadd/io/netty/channel/unix/FileDescriptor;", "state");
<oadd.io.netty.channel.unix.FileDescriptor: java.util.concurrent.atomic.AtomicIntegerFieldUpdater stateUpdater> = v;
return;
}
}