initat.java

来自「使用短信猫发送短信的程序源代码」· Java 代码 · 共 48 行

JAVA
48
字号
// Source File Name:   InitAT.java

import java.io.FileInputStream;
import java.util.Vector;

public class InitAT
{

    public InitAT()
    {
        commands = new Vector();
        byte abyte0[] = new byte[1024];
        commands.clear();
        try
        {
            FileInputStream fileinputstream = new FileInputStream("./init.at");
            int i;
            String s;
            String s1;
            for(s1 = ""; (i = fileinputstream.read(abyte0, 0, 1024)) != -1; s1 = s1 + s)
                s = new String(abyte0, 0, i);

            s1 = s1.replace('\t', ' ');
            s1 = s1.replace('\r', '\n');
            int j = 0;
            while(j < s1.length() - 1) 
            {
                int k = s1.indexOf('\n', j);
                String s2;
                if(k == -1)
                {
                    s2 = s1.substring(j);
                    j = s1.length();
                } else
                {
                    s2 = s1.substring(j, k);
                    j = k + 1;
                }
                String s3 = s2.trim();
                if(s3.length() != 0)
                    commands.addElement(s3);
            }
        }
        catch(Exception exception) { }
    }

    public Vector commands;
}

⌨️ 快捷键说明

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