PDA

View Full Version : مبتدی: سوال در مورد جاوا



djfalcon2005
یک شنبه 24 آبان 1388, 15:36 عصر
سلام دوستان
سوالی داشتم در مورد این سورسی که پایین گذاشتم
می خوام این کدها رو به یک زبان دیگه غیر از جاوا بنویسم که البته (شی گرا) نیست
تو دو تا کلاس این سورس مشکل دارم و راهنمایی می خوام


class c

package com.mmm.cs.ma3.protocol.f.b.a;

public class c
{
private long a;
private static long[] b;

static
{
long l = 0L;
b = new long[256];
for (int i = 0; i < 256; ++i)
{
l = i;
for (int j = 0; j < 8; ++j)
{
if (l % 2L == 0L)
l = l >> 1 & 0xFFFFFFFF;
else
l = (l >> 1 ^ 0xEDB88320) & 0xFFFFFFFF;
b[i] = l;
}
}
}

public c()
{
a();
}

public void a()
{
this.a = 0L;
}

private void a(byte paramByte)
{
long l1 = 0xFF & paramByte & 0xFFFFFFFF;
long l2 = (this.a ^ l1) & 0xFFFFFFFF;
this.a = ((this.a >> 8 & 0xFFFFFFFF ^ b[(int)(l2 & 0xFF)]) & 0xFFFFFFFF);
}

public void a(byte[] paramArrayOfByte)
{
boolean bool = h.x;
int i = 0;
if (bool);
do
{
a(paramArrayOfByte[i]);
++i;
}
while (i < 0 + paramArrayOfByte.length);
}

public long b()
{
return (this.a & 0xFFFFFFFF);
}
}

class h

package com.mmm.cs.ma3.protocol.f.b.a;

public class h extends e
{
public static boolean x;

protected h(int paramInt)
{
super(paramInt, 1);
}
}

class e

package com.mmm.cs.ma3.protocol.f.b.a;

public abstract class e
{
public static final int a = 1;
public static final int b = 2;
public static final int c = 3;
public static final int d = 4;
public static final int e = 5;
public static final int f = 6;
public static final int g = 7;
public static final int h = 8;
public static final int i = 9;
public static final int j = 10;
public static final int k = 11;
public static final int l = 12;
public static final int m = 13;
public static final int n = 14;
public static final int o = 16;
public static final int p = 17;
public static final int q = 18;
protected static final int r = 0;
protected static final int s = 1;
protected static final int t = 2;
private int u;
private int v;
public static boolean w;

protected e(int paramInt1, int paramInt2)
{
this.u = paramInt1;
this.v = paramInt2;
}

public int a()
{
return this.u;
}

public int b()
{
return this.v;
}
}
مشکل من با دو کلاس آخری هست یعنی e.class و h.class می خوام بدونم این دو کلاس چه وظیفه ای دارند و چه کاری برای کلاس اولی یعنی c.class می کنند.

با تشکر