⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 b.java

📁 KJAVA浏览器
💻 JAVA
字号:
// Decompiled by Jad v1.5.7g. Copyright 2000 Pavel Kouznetsov.
// Jad home page: http://www.geocities.com/SiliconValley/Bridge/8617/jad.html
// Decompiler options: packimports(3) fieldsfirst ansi

import java.io.IOException;
import java.util.Vector;
import javax.microedition.io.HttpConnection;

public class b
{

    private static final int _fldif = 20;
    private final Vector a = new Vector(2);

    public b()
    {
    }

    public void _mthif(HttpConnection httpconnection)
        throws IOException
    {
        int i = 0;
        do
        {
            String s = httpconnection.getHeaderFieldKey(i);
            if(s != null)
            {
                if(s.toLowerCase().equals("set-cookie"))
                {
                    String s1 = httpconnection.getHeaderField(i);
                    if(s1 != null)
                    {
                        Vector vector = new Vector(1);
                        e e1 = new e(s1, 1);
                        do
                        {
                            String s2 = null;
                            int j = -1;
                            String s3 = null;
                            boolean flag = false;
                            String s4 = e1.a();
                            if(!e.a(s4))
                                break;
                            String s5 = e1.a();
                            if(s5 == null || !s5.equals("="))
                                break;
                            String s6 = e1.a();
                            if(s6 == null)
                                break;
                            String s7 = e1.a();
                            String s11;
                            if(";".equals(s7))
                                do
                                {
                                    String s8 = e1.a();
                                    if(!e.a(s8))
                                        break;
                                    s8 = s8.toLowerCase();
                                    String s9 = e1.a();
                                    if(!"=".equals(s9))
                                        break;
                                    String s10 = e1.a();
                                    if(s10 == null)
                                        s10 = "";
                                    if(s8.equals("path"))
                                        s2 = s10.toLowerCase();
                                    else
                                    if(s8.equals("max-age"))
                                        try
                                        {
                                            j = Integer.parseInt(s10);
                                        }
                                        catch(NumberFormatException numberformatexception) { }
                                    else
                                    if(s8.equals("domain"))
                                        s3 = s10.toLowerCase();
                                    else
                                    if(s8.equals("version"))
                                        flag = true;
                                    s11 = e1.a();
                                } while(";".equals(s11));
                            a(a(httpconnection, s4, s6, s2, j, s3, flag));
                        } while(true);
                    }
                }
                i++;
            } else
            {
                return;
            }
        } while(true);
    }

    private m a(HttpConnection httpconnection, String s, String s1, String s2, int i, String s3, boolean flag)
        throws IOException
    {
        if(s2 == null)
            s2 = httpconnection.getFile();
        if(s2 != null)
        {
            s2 = s2.trim();
            if(s2.length() > 1)
            {
                int j = s2.lastIndexOf(47);
                if(j == -1)
                    s2 = null;
                else
                    s2 = s2.substring(0, j);
            }
        }
        if(s2 != null && !httpconnection.getFile().startsWith(s2))
            s2 = null;
        if(i < 0)
            i = 0x7fffffff;
        if(s3 == null)
            s3 = httpconnection.getHost();
        if(s2 == null || s3 == null)
            return null;
        else
            return new m(s, s1, s2, i, s3, flag);
    }

    private void a(m m1)
    {
        if(m1 == null)
            return;
        boolean flag = false;
        for(int i = 0; i < a.size(); i++)
        {
            m m2 = (m)a.elementAt(i);
            if(!m2._mthif(m1))
                continue;
            if(m1._flddo == 0)
            {
                a.removeElementAt(i);
                return;
            }
            a.setElementAt(m1, i);
            flag = true;
            break;
        }

        if(m1._flddo > 0 && !flag)
        {
            if(a.size() >= 20)
            {
                long l = System.currentTimeMillis();
                long l1 = l;
                int j = 0;
                boolean flag1 = false;
                for(int k = 0; k < 3 && !flag1; k++)
                {
                    for(int i1 = 0; i1 < a.size(); i1++)
                    {
                        m m3 = (m)a.elementAt(i1);
                        switch(k)
                        {
                        case 0: // '\0'
                            flag1 = m3._mthif(l);
                            break;

                        case 1: // '\001'
                            flag1 = !m3.a(m1);
                            break;

                        case 2: // '\002'
                            if(m3._fldif < l1)
                            {
                                l1 = m3._fldif;
                                j = i1;
                            }
                            break;
                        }
                        if(!flag1)
                            continue;
                        a.removeElementAt(i1);
                        break;
                    }

                }

                if(!flag1)
                    a.removeElementAt(j);
            }
            a.addElement(m1);
        }
    }

    public void a(HttpConnection httpconnection)
        throws IOException
    {
        String s = httpconnection.getHost();
        String s1 = httpconnection.getFile();
        if(s == null || s1 == null)
            return;
        long l = System.currentTimeMillis();
        Vector vector = new Vector(1);
        for(int i = 0; i < a.size();)
        {
            m m1 = (m)a.elementAt(i);
            if(m1._mthif(l))
            {
                a.removeElementAt(i);
            } else
            {
                if(m1.a(s, s1))
                {
                    boolean flag = false;
                    for(int k = 0; k < vector.size(); k++)
                    {
                        if(((m)vector.elementAt(k))._fldtry.length() >= m1._fldtry.length())
                            continue;
                        vector.insertElementAt(m1, k);
                        flag = true;
                        break;
                    }

                    if(!flag)
                        vector.addElement(m1);
                }
                i++;
            }
        }

        if(vector.size() > 0)
        {
            StringBuffer stringbuffer = new StringBuffer(64);
            if(((m)vector.firstElement()).a)
                stringbuffer.append("$Version=\"1\"");
            for(int j = 0; j < vector.size(); j++)
            {
                if(stringbuffer.length() > 0)
                    stringbuffer.append("; ");
                stringbuffer.append(((m)vector.elementAt(j)).a(l));
            }

            httpconnection.setRequestProperty("Cookie", stringbuffer.toString());
        }
    }

   /* static
    {
        _fldif = 20;
    }*/
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -