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

📄 pkgtools.java

📁 手机中用的MobileQQ源代码
💻 JAVA
📖 第 1 页 / 共 2 页
字号:
                    DBStrings[2] = "1";
                    for(int i = 0; i < 10; i++)
                        DBStrings[i + 3] = "0";

                } else
                {
                    byte abyte0[] = recordstore.getRecord(1);
                    ByteArrayInputStream bytearrayinputstream = new ByteArrayInputStream(abyte0);
                    datainputstream = new DataInputStream(bytearrayinputstream);
                    for(int j = 0; j < 13; j++)
                        DBStrings[j] = datainputstream.readUTF();

                }
            }
            catch(RecordStoreNotFoundException recordstorenotfoundexception)
            {
                if(datainputstream != null)
                    try
                    {
                        datainputstream.close();
                    }
                    catch(Exception exception2) { }
                if(recordstore != null)
                    try
                    {
                        recordstore.closeRecordStore();
                    }
                    catch(Exception exception3) { }
                break label0;
            }
            catch(Exception exception4)
            {
                if(datainputstream != null)
                    try
                    {
                        datainputstream.close();
                    }
                    catch(Exception exception5) { }
                if(recordstore != null)
                    try
                    {
                        recordstore.closeRecordStore();
                    }
                    catch(Exception exception6) { }
                break label0;
            }
            finally
            {
                if(datainputstream != null)
                    try
                    {
                        datainputstream.close();
                    }
                    catch(Exception exception8) { }
                if(recordstore != null)
                    try
                    {
                        recordstore.closeRecordStore();
                    }
                    catch(Exception exception9) { }
                throw exception7;
            }
            if(datainputstream != null)
                try
                {
                    datainputstream.close();
                }
                catch(Exception exception) { }
            if(recordstore != null)
                try
                {
                    recordstore.closeRecordStore();
                }
                catch(Exception exception1) { }
            break label0;
        }
    }

    public static void setUserInfo(String s, String s1)
    {
        DBStrings[0] = s;
        DBStrings[1] = s1;
        saveDB();
    }

    public static void setOtherInfo(String s, String s1, BlackList blacklist)
    {
        if(s1 != null)
            DBStrings[2] = s1;
        if(blacklist != null)
        {
            for(int i = 0; i < 10; i++)
                DBStrings[i + 3] = blacklist.getDBItem(i);

        }
        saveDB();
    }

    private static void fillVectorWithDB(String s, Vector vector, int i, int j)
    {
        if(DBStrings[i] == null)
            return;
        for(int k = i; k < i + j; k++)
            if(DBStrings[k].length() > 4)
                vector.addElement(DBStrings[k].trim());

    }

    public static String getUIN()
    {
        if(DBStrings[0] == null)
            return "0";
        else
            return DBStrings[0].trim();
    }

    public static String getPassWord()
    {
        if(DBStrings[1] == null)
            return "";
        else
            return DBStrings[1];
    }

    public static String getControl()
    {
        if(DBStrings[2] == null)
            return "1";
        else
            return DBStrings[2].trim();
    }

    public static void getBlackList(BlackList blacklist)
    {
        fillVectorWithDB("QQDB", blacklist.vList, 3, 10);
    }

    public static void loadFriendData()
    {
label0:
        {
            RecordStore recordstore = null;
            Object obj = null;
            DataInputStream datainputstream = null;
            Object obj1 = null;
            try
            {
                recordstore = RecordStore.openRecordStore("QQDB", true);
                int i = recordstore.getNumRecords();
                if(i >= 2)
                {
                    byte abyte0[] = recordstore.getRecord(2);
                    ByteArrayInputStream bytearrayinputstream = new ByteArrayInputStream(abyte0);
                    datainputstream = new DataInputStream(bytearrayinputstream);
                    String s = datainputstream.readUTF();
                    if(s.equals(KQQMIDlet.httpPoster.GetSelfUIN()))
                    {
                        for(long l = datainputstream.readLong(); l != 0L; l = datainputstream.readLong())
                        {
                            String s1 = datainputstream.readUTF();
                            short word0 = datainputstream.readShort();
                            int j = KQQMIDlet.friendRecord.getUserLocation(l);
                            if(j >= 0)
                                KQQMIDlet.friendRecord.SetInforByIndex(j, true, s1, word0);
                        }

                    }
                }
            }
            catch(RecordStoreNotFoundException recordstorenotfoundexception)
            {
                if(datainputstream != null)
                    try
                    {
                        datainputstream.close();
                    }
                    catch(Exception exception2) { }
                if(recordstore != null)
                    try
                    {
                        recordstore.closeRecordStore();
                    }
                    catch(Exception exception3) { }
                break label0;
            }
            catch(Exception exception4)
            {
                if(datainputstream != null)
                    try
                    {
                        datainputstream.close();
                    }
                    catch(Exception exception5) { }
                if(recordstore != null)
                    try
                    {
                        recordstore.closeRecordStore();
                    }
                    catch(Exception exception6) { }
                break label0;
            }
            finally
            {
                if(datainputstream != null)
                    try
                    {
                        datainputstream.close();
                    }
                    catch(Exception exception8) { }
                if(recordstore != null)
                    try
                    {
                        recordstore.closeRecordStore();
                    }
                    catch(Exception exception9) { }
                throw exception7;
            }
            if(datainputstream != null)
                try
                {
                    datainputstream.close();
                }
                catch(Exception exception) { }
            if(recordstore != null)
                try
                {
                    recordstore.closeRecordStore();
                }
                catch(Exception exception1) { }
            break label0;
        }
    }

    public static void saveFriendData(Vector vector)
    {
label0:
        {
            RecordStore recordstore = null;
            ByteArrayOutputStream bytearrayoutputstream = new ByteArrayOutputStream();
            DataOutputStream dataoutputstream = new DataOutputStream(bytearrayoutputstream);
            Object obj = null;
            try
            {
                recordstore = RecordStore.openRecordStore("QQDB", true);
                int i = recordstore.getNumRecords();
                dataoutputstream.writeUTF(KQQMIDlet.httpPoster.GetSelfUIN());
                for(int j = 0; j < vector.size(); j++)
                    if(((FriendRecordItem)vector.elementAt(j)).sState != 0)
                    {
                        dataoutputstream.writeLong(((FriendRecordItem)vector.elementAt(j)).lUserID);
                        dataoutputstream.writeUTF(((FriendRecordItem)vector.elementAt(j)).strName);
                        dataoutputstream.writeShort(((FriendRecordItem)vector.elementAt(j)).sFaceID);
                    }

                dataoutputstream.writeLong(0L);
                byte abyte0[] = bytearrayoutputstream.toByteArray();
                if(i < 2)
                    recordstore.addRecord(abyte0, 0, abyte0.length);
                else
                    recordstore.setRecord(2, abyte0, 0, abyte0.length);
            }
            catch(Exception exception2)
            {
                try
                {
                    dataoutputstream.close();
                }
                catch(Exception exception3) { }
                if(recordstore != null)
                    try
                    {
                        recordstore.closeRecordStore();
                    }
                    catch(Exception exception4) { }
                break label0;
            }
            finally
            {
                try
                {
                    dataoutputstream.close();
                }
                catch(Exception exception6) { }
                if(recordstore != null)
                    try
                    {
                        recordstore.closeRecordStore();
                    }
                    catch(Exception exception7) { }
                throw exception5;
            }
            try
            {
                dataoutputstream.close();
            }
            catch(Exception exception) { }
            if(recordstore != null)
                try
                {
                    recordstore.closeRecordStore();
                }
                catch(Exception exception1) { }
            break label0;
        }
    }

}

⌨️ 快捷键说明

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