fos =new FileOutputStream(System.getProperty("user.home")+ "/.BoTtoolBar"); oos = new ObjectOutputStream(fos); oos.writeObject(defToolBar);
FileOutputStream fos = new FileOutputStream(System.getProperty("user.home")+ "/.BoTtoolBar"); OutputStreamWriter osw = new OutputStreamWriter(fos); for (Iterator i = defToolBar.iterator(); i.hasNext(); ) { Action action = (Action) i.next(); if (action == null) osw.write("\n"); else { String name = action.getClass().getName(); Pattern p = Pattern.compile(".*\\.([^.]*)$"); Matcher m = p.matcher(name); if (m.find()) { name = name.substring(m.start(1), m.end(1)); osw.write(name + "\n"); } } } osw.flush(); osw.close();
	public void saveToolBar() {		FileOutputStream fos = null;		ObjectOutputStream oos=null;		try {			fos =new FileOutputStream(System.getProperty("user.home")+ "/.BoTtoolBar");			oos = new ObjectOutputStream(fos);			oos.writeObject(defToolBar);		} catch (FileNotFoundException e1) {			return;		} catch (IOException e3) {			return;		}	}