Java browser:

Content of extracted from search.jar

IMPORTANT NOTICE, please read:
This software is licensed under the terms of the GNU GENERAL PUBLIC LICENSE,
please read the enclosed file license.txt or
Note that this software is freeware and it is not designed, licensed or intended
for use in mission critical, life support and military purposes.
The use of this software is at the risk of the user.
class SearchPreferences provides the preferences of the search
used by 
01-11-2006 version 0.1.1: added methods readXML() and writeXML()
package search;
import java.util.*;
interface Match {
	public boolean matchFile(File f);
public class SearchPreferences {  
	static final String preferencesFile = "search.xml";
	String searchStr;
	String dir;
	boolean caseSensitive;
	boolean searchSubfolders;
	String pattern;
	Match match;
// empty constructor
	public SearchPreferences () {  
// readXML()
// read preferences from default file, as defined in preferencesFile
// note that default values will be used if IO failure occurs
	public SearchPreferences readXML() {  
		InputStream is;
		try	{
			is = new FileInputStream(new File(preferencesFile));
		}	catch (IOException ex) { is = null;}
		return readXML(is);
// readXML(InputStream is)
// note that default values will be used if IO failure occurs
	public SearchPreferences readXML(InputStream is) {  
		Properties props=new Properties();
		if (is != null)
		try	{
		}	catch (IOException ex) {	}
		return this;
// writeXML()
	public void writeXML() throws FileNotFoundException, IOException {  
		writeXML(new FileOutputStream(new File(preferencesFile)));
// writeXML(OutputStream os)
	public void writeXML(OutputStream os) throws FileNotFoundException, IOException {  
			Properties props=new Properties();
			props.storeToXML(os,"generated by Search");
Share: Share Share on Facebook Bookmark on OkNo Share on Twitter Bookmark on Google Bookmark on Bookmark on Bookmark on Segnalo Bookmark on Reddit
Privacy Creative Commons Attribution-Share Alike Trovami