/* Class48 - Decompiled by JODE
 * Visit http://jode.sourceforge.net/
 */
import java.io.DataInputStream;
import java.io.IOException;
import java.net.URL;
import java.net.URLConnection;
import java.util.LinkedList;
import java.util.Queue;

public class Class48 implements Runnable
{
    volatile boolean aBool598;
    Thread aThread599;
    Queue aQueue600 = new LinkedList();
    static Class153 aClass153_601;
    
    Class48() {
	((Class48) this).aThread599 = new Thread(this);
	((Class48) this).aThread599.setPriority(1);
	((Class48) this).aThread599.start();
    }
    
    Class84 method900(URL url, int i) {
	Class84 class84 = new Class84(url);
	synchronized (this) {
	    ((Class48) this).aQueue600.add(class84);
	    this.notify();
	}
	return class84;
    }
    
    void method901(byte i) {
	((Class48) this).aBool598 = true;
	try {
	    synchronized (this) {
		this.notify();
	    }
	    ((Class48) this).aThread599.join();
	} catch (InterruptedException interruptedexception) {
	    /* empty */
	}
    }
    
    public void method902() {
	while (!((Class48) this).aBool598) {
	    try {
		Class84 class84;
		synchronized (this) {
		    class84 = (Class84) ((Class48) this).aQueue600.poll();
		    if (null == class84) {
			try {
			    this.wait();
			} catch (InterruptedException interruptedexception) {
			    /* empty */
			}
			continue;
		    }
		}
		try {
		    URLConnection urlconnection
			= ((Class84) class84).anURL1194.openConnection();
		    urlconnection.setConnectTimeout(30000);
		    int i = urlconnection.getContentLength();
		    if (i >= 0) {
			byte[] is = new byte[i];
			new DataInputStream(urlconnection.getInputStream())
			    .readFully(is);
			((Class84) class84).aByteArray1196 = is;
		    }
		    ((Class84) class84).aBool1195 = true;
		} catch (IOException ioexception) {
		    ((Class84) class84).aBool1195 = true;
		}
	    } catch (Exception exception) {
		Class430_Sub3.method8950(null, exception, -134359484);
	    }
	}
    }
    
    public void method903() {
	while (!((Class48) this).aBool598) {
	    try {
		Class84 class84;
		synchronized (this) {
		    class84 = (Class84) ((Class48) this).aQueue600.poll();
		    if (null == class84) {
			try {
			    this.wait();
			} catch (InterruptedException interruptedexception) {
			    /* empty */
			}
			continue;
		    }
		}
		try {
		    URLConnection urlconnection
			= ((Class84) class84).anURL1194.openConnection();
		    urlconnection.setConnectTimeout(30000);
		    int i = urlconnection.getContentLength();
		    if (i >= 0) {
			byte[] is = new byte[i];
			new DataInputStream(urlconnection.getInputStream())
			    .readFully(is);
			((Class84) class84).aByteArray1196 = is;
		    }
		    ((Class84) class84).aBool1195 = true;
		} catch (IOException ioexception) {
		    ((Class84) class84).aBool1195 = true;
		}
	    } catch (Exception exception) {
		Class430_Sub3.method8950(null, exception, -2074750068);
	    }
	}
    }
    
    public void run() {
	while (!((Class48) this).aBool598) {
	    try {
		Class84 class84;
		synchronized (this) {
		    class84 = (Class84) ((Class48) this).aQueue600.poll();
		    if (null == class84) {
			try {
			    this.wait();
			} catch (InterruptedException interruptedexception) {
			    /* empty */
			}
			continue;
		    }
		}
		try {
		    URLConnection urlconnection
			= ((Class84) class84).anURL1194.openConnection();
		    urlconnection.setConnectTimeout(30000);
		    int i = urlconnection.getContentLength();
		    if (i >= 0) {
			byte[] is = new byte[i];
			new DataInputStream(urlconnection.getInputStream())
			    .readFully(is);
			((Class84) class84).aByteArray1196 = is;
		    }
		    ((Class84) class84).aBool1195 = true;
		} catch (IOException ioexception) {
		    ((Class84) class84).aBool1195 = true;
		}
	    } catch (Exception exception) {
		Class430_Sub3.method8950(null, exception, -1165830633);
	    }
	}
    }
    
    void method904() {
	((Class48) this).aBool598 = true;
	try {
	    synchronized (this) {
		this.notify();
	    }
	    ((Class48) this).aThread599.join();
	} catch (InterruptedException interruptedexception) {
	    /* empty */
	}
    }
    
    void method905() {
	((Class48) this).aBool598 = true;
	try {
	    synchronized (this) {
		this.notify();
	    }
	    ((Class48) this).aThread599.join();
	} catch (InterruptedException interruptedexception) {
	    /* empty */
	}
    }
    
    public static void method906(boolean bool, byte i) {
	Class416.aClass181_4669.method2719((byte) -6);
	if (Class67_Sub1_Sub2.method10126(487402729 * client.anInt10701,
					  1619152690)) {
	    Class65[] class65s = client.aClass65Array10745;
	    for (int i_0_ = 0; i_0_ < class65s.length; i_0_++) {
		Class65 class65 = class65s[i_0_];
		class65.anInt947 += 110277931;
		if (class65.anInt947 * -1864867453 < 50 && !bool)
		    return;
		class65.anInt947 = 0;
		if (!class65.aBool952
		    && class65.method1066((byte) 67) != null) {
		    Class487_Sub19 class487_sub19
			= Class667_Sub1.method9955(Class362.aClass362_3929,
						   class65.aClass676_946,
						   852043838);
		    class65.method1056(class487_sub19, (byte) 64);
		    try {
			class65.method1057(1859296236);
		    } catch (IOException ioexception) {
			class65.aBool952 = true;
		    }
		}
	    }
	    Class416.aClass181_4669.method2719((byte) 73);
	}
    }
    
    static int method907(int i, byte i_1_) {
	if (i == 9 || 10 == i)
	    return 1;
	if (11 == i)
	    return 8;
	return i;
    }
    
    static final void method908(Class612 class612, byte i) {
	Class600.method7321(false, 1592427217);
    }
    
    public static Class661 method909(String string, int i, byte i_2_) {
	Class661_Sub1 class661_sub1 = new Class661_Sub1();
	((Class661) class661_sub1).aString8411 = string;
	((Class661) class661_sub1).anInt8412 = i * -401008703;
	return class661_sub1;
    }
    
    public static final void method910(int i, int i_3_, int i_4_, int i_5_,
				       int i_6_, boolean bool, byte i_7_) {
	Class288.anInt3298 = 87338419 * i;
	Class270.anInt3161 = 1999639207 * i_3_;
	Class212.anInt2433 = i_4_ * 2138466775;
	Class347.anInt3685 = i_5_ * 1016384369;
	Class575.anInt7711 = i_6_ * 2015460403;
	if (1 == Class168.anInt1964 * -532631733)
	    Class38.method817(-967325159);
	if (bool && -978460933 * Class575.anInt7711 >= 100) {
	    Class79.anInt1121 = 7123200 + -530311680 * Class288.anInt3298;
	    Class450.anInt5163 = -563824128 * Class270.anInt3161 + 73706240;
	    Class131.anInt1540
		= (Class341.method4355(674126929 * Class79.anInt1121,
				       Class450.anInt5163 * 1856271875,
				       Class163_Sub11.anInt9637 * -705395661,
				       -1332631752)
		   - Class212.anInt2433 * 1705220583) * -1080422359;
	}
	Class168.anInt1964 = 966698793;
	Class570.anInt7651 = -407569933;
	Class452.anInt5209 = -745385441;
    }
    
    static final void method911(Class612 class612, int i) {
	((Class612) class612).anIntArray8021
	    [(((Class612) class612).anInt8022 += 201091009) * -40654783 - 1]
	    = 1314963415 * Class646.anInt8242;
    }
}
