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

📄 configoperationstring.java

📁 桌面管理 可以将桌面的快捷方式集中管理
💻 JAVA
字号:
package com.deskManager.File;import com.deskApp.Interface.FileOperation;import java.io.*;import java.util.ArrayList;public class ConfigOperationString implements FileOperation {    public static String ConfigFileName = "data/proData/config.config";    public Config getConfig() throws Exception {        FileReader fr = new FileReader(ConfigFileName);        BufferedReader br = new BufferedReader(fr);        String temp = br.readLine();        br.close();        fr.close();        char t[] = new char[1];        int count = 0;        String tempstr[] = new String[2];        String tt = "";        for (int i = 0; i < temp.length(); i++) {            t[0] = temp.charAt(i);            if (t[0] == '|') {                tempstr[count] = tt;                count++;                tt = "";            } else {                tt = tt + new String(t);            }        }        Config config = new Config();        config.setDoublechick(Integer.parseInt(tempstr[0]));        config.setHistory(tempstr[1]);        return config;    }    @Override    public void SaveOrUpdate(Object config) throws Exception {        FileWriter fw = new FileWriter(ConfigFileName);        BufferedWriter bw = new BufferedWriter(fw);        bw.write(config.toString());        bw.close();        fw.close();    }    public int getDoubleChick() throws Exception {        Config config = getConfig();        return config.getDoublechick();    }    public String getHistory() throws Exception {        Config config = getConfig();        return config.getHistory();    }    @SuppressWarnings("unchecked")	@Override    public ArrayList list() throws Exception {        throw new UnsupportedOperationException("Not supported yet.");    }    @Override    public void del(Object o) throws Exception {        throw new UnsupportedOperationException("Not supported yet.");    }    protected void taxis() throws Exception {        throw new UnsupportedOperationException("Not supported yet.");    }}

⌨️ 快捷键说明

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