public class oadd.org.apache.commons.codec.binary.BinaryCodec extends java.lang.Object implements oadd.org.apache.commons.codec.BinaryDecoder, oadd.org.apache.commons.codec.BinaryEncoder
{
private static final char[] EMPTY_CHAR_ARRAY;
private static final byte[] EMPTY_BYTE_ARRAY;
private static final int BIT_0;
private static final int BIT_1;
private static final int BIT_2;
private static final int BIT_3;
private static final int BIT_4;
private static final int BIT_5;
private static final int BIT_6;
private static final int BIT_7;
private static final int[] BITS;
public void <init>()
{
oadd.org.apache.commons.codec.binary.BinaryCodec v;
v := @this: oadd.org.apache.commons.codec.binary.BinaryCodec;
specialinvoke v.<java.lang.Object: void <init>()>();
return;
}
public byte[] encode(byte[])
{
byte[] v, v;
oadd.org.apache.commons.codec.binary.BinaryCodec v;
v := @this: oadd.org.apache.commons.codec.binary.BinaryCodec;
v := @parameter: byte[];
v = staticinvoke <oadd.org.apache.commons.codec.binary.BinaryCodec: byte[] toAsciiBytes(byte[])>(v);
return v;
}
public java.lang.Object encode(java.lang.Object) throws oadd.org.apache.commons.codec.EncoderException
{
oadd.org.apache.commons.codec.EncoderException v;
char[] v;
java.lang.Object v;
oadd.org.apache.commons.codec.binary.BinaryCodec v;
boolean v;
v := @this: oadd.org.apache.commons.codec.binary.BinaryCodec;
v := @parameter: java.lang.Object;
v = v instanceof byte[];
if v != 0 goto label;
v = new oadd.org.apache.commons.codec.EncoderException;
specialinvoke v.<oadd.org.apache.commons.codec.EncoderException: void <init>(java.lang.String)>("argument not a byte array");
throw v;
label:
v = staticinvoke <oadd.org.apache.commons.codec.binary.BinaryCodec: char[] toAsciiChars(byte[])>(v);
return v;
}
public java.lang.Object decode(java.lang.Object) throws oadd.org.apache.commons.codec.DecoderException
{
byte[] v, v, v, v;
oadd.org.apache.commons.codec.DecoderException v;
char[] v;
java.lang.Object v;
oadd.org.apache.commons.codec.binary.BinaryCodec v;
boolean v, v, v;
v := @this: oadd.org.apache.commons.codec.binary.BinaryCodec;
v := @parameter: java.lang.Object;
if v != null goto label;
v = <oadd.org.apache.commons.codec.binary.BinaryCodec: byte[] EMPTY_BYTE_ARRAY>;
return v;
label:
v = v instanceof byte[];
if v == 0 goto label;
v = staticinvoke <oadd.org.apache.commons.codec.binary.BinaryCodec: byte[] fromAscii(byte[])>(v);
return v;
label:
v = v instanceof char[];
if v == 0 goto label;
v = staticinvoke <oadd.org.apache.commons.codec.binary.BinaryCodec: byte[] fromAscii(char[])>(v);
return v;
label:
v = v instanceof java.lang.String;
if v == 0 goto label;
v = virtualinvoke v.<java.lang.String: char[] toCharArray()>();
v = staticinvoke <oadd.org.apache.commons.codec.binary.BinaryCodec: byte[] fromAscii(char[])>(v);
return v;
label:
v = new oadd.org.apache.commons.codec.DecoderException;
specialinvoke v.<oadd.org.apache.commons.codec.DecoderException: void <init>(java.lang.String)>("argument not a byte array");
throw v;
}
public byte[] decode(byte[])
{
byte[] v, v;
oadd.org.apache.commons.codec.binary.BinaryCodec v;
v := @this: oadd.org.apache.commons.codec.binary.BinaryCodec;
v := @parameter: byte[];
v = staticinvoke <oadd.org.apache.commons.codec.binary.BinaryCodec: byte[] fromAscii(byte[])>(v);
return v;
}
public byte[] toByteArray(java.lang.String)
{
byte[] v, v;
char[] v;
oadd.org.apache.commons.codec.binary.BinaryCodec v;
java.lang.String v;
v := @this: oadd.org.apache.commons.codec.binary.BinaryCodec;
v := @parameter: java.lang.String;
if v != null goto label;
v = <oadd.org.apache.commons.codec.binary.BinaryCodec: byte[] EMPTY_BYTE_ARRAY>;
return v;
label:
v = virtualinvoke v.<java.lang.String: char[] toCharArray()>();
v = staticinvoke <oadd.org.apache.commons.codec.binary.BinaryCodec: byte[] fromAscii(char[])>(v);
return v;
}
public static byte[] fromAscii(char[])
{
byte[] v, v;
byte v;
int[] v, v;
int v, v, v, v, v, v, v, v, v, v, v, v;
char v;
char[] v;
v := @parameter: char[];
if v == null goto label;
v = lengthof v;
if v != 0 goto label;
label:
v = <oadd.org.apache.commons.codec.binary.BinaryCodec: byte[] EMPTY_BYTE_ARRAY>;
return v;
label:
v = lengthof v;
v = v >> 3;
v = newarray (byte)[v];
v = 0;
v = lengthof v;
v = v - 1;
label:
v = lengthof v;
if v >= v goto label;
v = 0;
label:
v = <oadd.org.apache.commons.codec.binary.BinaryCodec: int[] BITS>;
v = lengthof v;
if v >= v goto label;
v = v - v;
v = v[v];
if v != 49 goto label;
v = v[v];
v = <oadd.org.apache.commons.codec.binary.BinaryCodec: int[] BITS>;
v = v[v];
v = v | v;
v[v] = v;
label:
v = v + 1;
goto label;
label:
v = v + 1;
v = v - 8;
goto label;
label:
return v;
}
public static byte[] fromAscii(byte[])
{
byte[] v, v, v;
byte v, v;
int[] v, v;
int v, v, v, v, v, v, v, v, v, v, v;
boolean v;
v := @parameter: byte[];
v = staticinvoke <oadd.org.apache.commons.codec.binary.BinaryCodec: boolean isEmpty(byte[])>(v);
if v == 0 goto label;
v = <oadd.org.apache.commons.codec.binary.BinaryCodec: byte[] EMPTY_BYTE_ARRAY>;
return v;
label:
v = lengthof v;
v = v >> 3;
v = newarray (byte)[v];
v = 0;
v = lengthof v;
v = v - 1;
label:
v = lengthof v;
if v >= v goto label;
v = 0;
label:
v = <oadd.org.apache.commons.codec.binary.BinaryCodec: int[] BITS>;
v = lengthof v;
if v >= v goto label;
v = v - v;
v = v[v];
if v != 49 goto label;
v = v[v];
v = <oadd.org.apache.commons.codec.binary.BinaryCodec: int[] BITS>;
v = v[v];
v = v | v;
v[v] = v;
label:
v = v + 1;
goto label;
label:
v = v + 1;
v = v - 8;
goto label;
label:
return v;
}
private static boolean isEmpty(byte[])
{
int v;
byte[] v;
boolean v;
v := @parameter: byte[];
if v == null goto label;
v = lengthof v;
if v != 0 goto label;
label:
v = 1;
goto label;
label:
v = 0;
label:
return v;
}
public static byte[] toAsciiBytes(byte[])
{
byte[] v, v, v;
byte v;
int[] v, v;
int v, v, v, v, v, v, v, v, v, v, v, v;
boolean v;
v := @parameter: byte[];
v = staticinvoke <oadd.org.apache.commons.codec.binary.BinaryCodec: boolean isEmpty(byte[])>(v);
if v == 0 goto label;
v = <oadd.org.apache.commons.codec.binary.BinaryCodec: byte[] EMPTY_BYTE_ARRAY>;
return v;
label:
v = lengthof v;
v = v << 3;
v = newarray (byte)[v];
v = 0;
v = lengthof v;
v = v - 1;
label:
v = lengthof v;
if v >= v goto label;
v = 0;
label:
v = <oadd.org.apache.commons.codec.binary.BinaryCodec: int[] BITS>;
v = lengthof v;
if v >= v goto label;
v = v[v];
v = <oadd.org.apache.commons.codec.binary.BinaryCodec: int[] BITS>;
v = v[v];
v = v & v;
if v != 0 goto label;
v = v - v;
v[v] = 48;
goto label;
label:
v = v - v;
v[v] = 49;
label:
v = v + 1;
goto label;
label:
v = v + 1;
v = v - 8;
goto label;
label:
return v;
}
public static char[] toAsciiChars(byte[])
{
byte[] v;
byte v;
int[] v, v;
int v, v, v, v, v, v, v, v, v, v, v, v;
boolean v;
char[] v, v;
v := @parameter: byte[];
v = staticinvoke <oadd.org.apache.commons.codec.binary.BinaryCodec: boolean isEmpty(byte[])>(v);
if v == 0 goto label;
v = <oadd.org.apache.commons.codec.binary.BinaryCodec: char[] EMPTY_CHAR_ARRAY>;
return v;
label:
v = lengthof v;
v = v << 3;
v = newarray (char)[v];
v = 0;
v = lengthof v;
v = v - 1;
label:
v = lengthof v;
if v >= v goto label;
v = 0;
label:
v = <oadd.org.apache.commons.codec.binary.BinaryCodec: int[] BITS>;
v = lengthof v;
if v >= v goto label;
v = v[v];
v = <oadd.org.apache.commons.codec.binary.BinaryCodec: int[] BITS>;
v = v[v];
v = v & v;
if v != 0 goto label;
v = v - v;
v[v] = 48;
goto label;
label:
v = v - v;
v[v] = 49;
label:
v = v + 1;
goto label;
label:
v = v + 1;
v = v - 8;
goto label;
label:
return v;
}
public static java.lang.String toAsciiString(byte[])
{
byte[] v;
char[] v;
java.lang.String v;
v := @parameter: byte[];
v = new java.lang.String;
v = staticinvoke <oadd.org.apache.commons.codec.binary.BinaryCodec: char[] toAsciiChars(byte[])>(v);
specialinvoke v.<java.lang.String: void <init>(char[])>(v);
return v;
}
static void <clinit>()
{
byte[] v;
char[] v;
int[] v;
v = newarray (char)[0];
<oadd.org.apache.commons.codec.binary.BinaryCodec: char[] EMPTY_CHAR_ARRAY> = v;
v = newarray (byte)[0];
<oadd.org.apache.commons.codec.binary.BinaryCodec: byte[] EMPTY_BYTE_ARRAY> = v;
v = newarray (int)[8];
v[0] = 1;
v[1] = 2;
v[2] = 4;
v[3] = 8;
v[4] = 16;
v[5] = 32;
v[6] = 64;
v[7] = 128;
<oadd.org.apache.commons.codec.binary.BinaryCodec: int[] BITS> = v;
return;
}
}