public final class oadd.org.apache.hadoop.io.erasurecode.rawcoder.CoderUtil extends java.lang.Object
{
private static byte[] emptyChunk;
private void <init>()
{
oadd.org.apache.hadoop.io.erasurecode.rawcoder.CoderUtil v;
v := @this: oadd.org.apache.hadoop.io.erasurecode.rawcoder.CoderUtil;
specialinvoke v.<java.lang.Object: void <init>()>();
return;
}
static byte[] getEmptyChunk(int)
{
java.lang.Throwable v;
byte[] v, v, v, v;
int v, v;
v := @parameter: int;
v = <oadd.org.apache.hadoop.io.erasurecode.rawcoder.CoderUtil: byte[] emptyChunk>;
v = lengthof v;
if v < v goto label;
v = <oadd.org.apache.hadoop.io.erasurecode.rawcoder.CoderUtil: byte[] emptyChunk>;
return v;
label:
entermonitor class "Loadd/org/apache/hadoop/io/erasurecode/rawcoder/CoderUtil;";
label:
v = newarray (byte)[v];
<oadd.org.apache.hadoop.io.erasurecode.rawcoder.CoderUtil: byte[] emptyChunk> = v;
exitmonitor class "Loadd/org/apache/hadoop/io/erasurecode/rawcoder/CoderUtil;";
label:
goto label;
label:
v := @caughtexception;
exitmonitor class "Loadd/org/apache/hadoop/io/erasurecode/rawcoder/CoderUtil;";
throw v;
label:
v = <oadd.org.apache.hadoop.io.erasurecode.rawcoder.CoderUtil: byte[] emptyChunk>;
return v;
catch java.lang.Throwable from label to label with label;
}
static java.nio.ByteBuffer resetBuffer(java.nio.ByteBuffer, int)
{
byte[] v;
int v, v;
java.nio.ByteBuffer v;
v := @parameter: java.nio.ByteBuffer;
v := @parameter: int;
v = virtualinvoke v.<java.nio.ByteBuffer: int position()>();
v = staticinvoke <oadd.org.apache.hadoop.io.erasurecode.rawcoder.CoderUtil: byte[] getEmptyChunk(int)>(v);
virtualinvoke v.<java.nio.ByteBuffer: java.nio.ByteBuffer put(byte[],int,int)>(v, 0, v);
virtualinvoke v.<java.nio.ByteBuffer: java.nio.ByteBuffer position(int)>(v);
return v;
}
static byte[] resetBuffer(byte[], int, int)
{
byte[] v, v;
int v, v;
v := @parameter: byte[];
v := @parameter: int;
v := @parameter: int;
v = staticinvoke <oadd.org.apache.hadoop.io.erasurecode.rawcoder.CoderUtil: byte[] getEmptyChunk(int)>(v);
staticinvoke <java.lang.System: void arraycopy(java.lang.Object,int,java.lang.Object,int,int)>(v, 0, v, v, v);
return v;
}
static void resetOutputBuffers(java.nio.ByteBuffer[], int)
{
java.nio.ByteBuffer[] v;
int v, v, v;
java.nio.ByteBuffer v;
v := @parameter: java.nio.ByteBuffer[];
v := @parameter: int;
v = lengthof v;
v = 0;
label:
if v >= v goto label;
v = v[v];
staticinvoke <oadd.org.apache.hadoop.io.erasurecode.rawcoder.CoderUtil: java.nio.ByteBuffer resetBuffer(java.nio.ByteBuffer,int)>(v, v);
v = v + 1;
goto label;
label:
return;
}
static void resetOutputBuffers(byte[][], int[], int)
{
byte[] v;
byte[][] v;
int[] v;
int v, v, v, v;
v := @parameter: byte[][];
v := @parameter: int[];
v := @parameter: int;
v = 0;
label:
v = lengthof v;
if v >= v goto label;
v = v[v];
v = v[v];
staticinvoke <oadd.org.apache.hadoop.io.erasurecode.rawcoder.CoderUtil: byte[] resetBuffer(byte[],int,int)>(v, v, v);
v = v + 1;
goto label;
label:
return;
}
static java.nio.ByteBuffer[] toBuffers(oadd.org.apache.hadoop.io.erasurecode.ECChunk[])
{
java.nio.ByteBuffer[] v;
oadd.org.apache.hadoop.io.erasurecode.ECChunk v;
java.nio.ByteBuffer v, v, v;
oadd.org.apache.hadoop.io.erasurecode.ECChunk[] v;
int v, v, v, v;
boolean v;
v := @parameter: oadd.org.apache.hadoop.io.erasurecode.ECChunk[];
v = lengthof v;
v = newarray (java.nio.ByteBuffer)[v];
v = 0;
label:
v = lengthof v;
if v >= v goto label;
v = v[v];
if v != null goto label;
v[v] = null;
goto label;
label:
v = virtualinvoke v.<oadd.org.apache.hadoop.io.erasurecode.ECChunk: java.nio.ByteBuffer getBuffer()>();
v[v] = v;
v = virtualinvoke v.<oadd.org.apache.hadoop.io.erasurecode.ECChunk: boolean isAllZero()>();
if v == 0 goto label;
v = v[v];
v = v[v];
v = virtualinvoke v.<java.nio.ByteBuffer: int remaining()>();
staticinvoke <oadd.org.apache.hadoop.io.erasurecode.rawcoder.CoderUtil: java.nio.ByteBuffer resetBuffer(java.nio.ByteBuffer,int)>(v, v);
label:
v = v + 1;
goto label;
label:
return v;
}
static java.nio.ByteBuffer cloneAsDirectByteBuffer(byte[], int, int)
{
byte[] v;
int v, v;
java.nio.ByteBuffer v;
v := @parameter: byte[];
v := @parameter: int;
v := @parameter: int;
if v != null goto label;
return null;
label:
v = staticinvoke <java.nio.ByteBuffer: java.nio.ByteBuffer allocateDirect(int)>(v);
virtualinvoke v.<java.nio.ByteBuffer: java.nio.ByteBuffer put(byte[],int,int)>(v, v, v);
virtualinvoke v.<java.nio.ByteBuffer: java.nio.ByteBuffer flip()>();
return v;
}
static int[] getNullIndexes(java.lang.Object[])
{
java.lang.Object[] v;
int[] v, v;
int v, v, v, v, v;
java.lang.Object v;
v := @parameter: java.lang.Object[];
v = lengthof v;
v = newarray (int)[v];
v = 0;
v = 0;
label:
v = lengthof v;
if v >= v goto label;
v = v[v];
if v != null goto label;
v = v;
v = v + 1;
v[v] = v;
label:
v = v + 1;
goto label;
label:
v = staticinvoke <java.util.Arrays: int[] copyOf(int[],int)>(v, v);
return v;
}
static java.lang.Object findFirstValidInput(java.lang.Object[])
{
java.lang.Object[] v;
int v, v;
java.lang.Object v;
oadd.org.apache.hadoop.HadoopIllegalArgumentException v;
v := @parameter: java.lang.Object[];
v = lengthof v;
v = 0;
label:
if v >= v goto label;
v = v[v];
if v == null goto label;
return v;
label:
v = v + 1;
goto label;
label:
v = new oadd.org.apache.hadoop.HadoopIllegalArgumentException;
specialinvoke v.<oadd.org.apache.hadoop.HadoopIllegalArgumentException: void <init>(java.lang.String)>("Invalid inputs are found, all being null");
throw v;
}
static int[] getValidIndexes(java.lang.Object[])
{
java.lang.Object[] v;
int[] v, v;
int v, v, v, v, v;
java.lang.Object v;
v := @parameter: java.lang.Object[];
v = lengthof v;
v = newarray (int)[v];
v = 0;
v = 0;
label:
v = lengthof v;
if v >= v goto label;
v = v[v];
if v == null goto label;
v = v;
v = v + 1;
v[v] = v;
label:
v = v + 1;
goto label;
label:
v = staticinvoke <java.util.Arrays: int[] copyOf(int[],int)>(v, v);
return v;
}
static void <clinit>()
{
byte[] v;
v = newarray (byte)[4096];
<oadd.org.apache.hadoop.io.erasurecode.rawcoder.CoderUtil: byte[] emptyChunk> = v;
return;
}
}