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

📄 addresslist.java

📁 试用JAVA通过COMM口发送短信的代码.
💻 JAVA
字号:
// Decompiled by Jad v1.5.8g. Copyright 2001 Pavel Kouznetsov.
// Jad home page: http://www.kpdus.com/jad.html
// Decompiler options: packimports(3) 
// Source File Name:   AddressList.java

package org.cross.sms.gui;

import java.io.*;
import java.util.Vector;

public class AddressList extends Vector
{

    public AddressList()
    {
    }

    public String getPhone(int i)
    {
        return (String)get(i);
    }

    public void init()
    {
        File f;
        BufferedReader fr;
        f = new File("address");
        if(!f.exists())
            return;
        fr = null;
        try
        {
            fr = new BufferedReader(new FileReader(f));
            String add = null;
            do
            {
                if((add = fr.readLine()) == null)
                    break;
                if(!add.equals(""))
                    add(add);
            } while(true);
        }
        catch(Exception ex)
        {
            try
            {
                fr.close();
            }
            // Misplaced declaration of an exception variable
            catch(Exception ex1) { 
            	ex1.printStackTrace(); 
            	
            }
//            break MISSING_BLOCK_LABEL_105;
        }
        try
        {
            fr.close();
        }
        catch(Exception ex) { 
        	ex.printStackTrace();
        }
//        break MISSING_BLOCK_LABEL_105;
//        Exception exception;
//        exception;
        try
        {
            fr.close();
        }
        catch(Exception ex) { 
        	ex.printStackTrace();
        }
//        throw exception;
    }

    public void save()
    {
        PrintStream out;
        File f = new File("address");
        if(f.exists())
            f.delete();
        out = null;
        try {
			out = new PrintStream(new FileOutputStream("address"));
		} catch (FileNotFoundException e) {
			// TODO 自动生成 catch 块
			e.printStackTrace();
		}
        for(int i = 0; i < size(); i++)
            out.println(get(i));

        out.flush();
//        Exception ex;
        try
        {
            out.close();
        }
        // Misplaced declaration of an exception variable
        catch(Exception ex) {
        	ex.printStackTrace();
        }
//        break MISSING_BLOCK_LABEL_111;
//        ex;
//        ex.printStackTrace();
        try
        {
            out.close();
        }
        // Misplaced declaration of an exception variable
        catch(Exception ex) { 
        	 ex.printStackTrace();
        }
//        break MISSING_BLOCK_LABEL_111;
//        Exception exception;
//        exception;
        try
        {
            out.close();
        }
        catch(Exception ex) { 
        	ex.printStackTrace();
        }
//        throw exception;
    }

    public static void main(String args[])
    {
        AddressList addresslist = new AddressList();
    }
}

⌨️ 快捷键说明

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