net.proxy.sunproxy
Class NSPreferences
java.lang.Object
net.proxy.sunproxy.NSPreferences
public class NSPreferences
- extends java.lang.Object
Configuration information about Netscape 4.x, notably the proxy addresses,
is stored in a JavaScript format file on both Windows and Unix. Each
line in the file is a call to the user_pref function, here's an
example:
user_pref("network.proxy.http", "webcache-cup.eng");
This class supports extracting the proxy related entries from this file,
and initializing an InternetProxyInfo object. It could be used like this
to print the current NS proxy settings on Unix:
InternetProxyInfo info = new InternetProxyInfo();
NSPreferences.parse(new File("/home/jaxbtest/.netscape/preferences.js"), info);
System.out.println(info);
- Version:
- 1.5, 02/09/01
Method Summary |
static void |
parseFile(java.io.File file,
InternetProxyInfo info,
float version)
Extract the proxy information from the specified "prefs.js" JavaScript
file ("preferences.js" on Unix) and return an InternetProxyInfo object
that contains whatever information was found. |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
NSPreferences
public NSPreferences()
parseFile
public static void parseFile(java.io.File file,
InternetProxyInfo info,
float version)
- Extract the proxy information from the specified "prefs.js" JavaScript
file ("preferences.js" on Unix) and return an InternetProxyInfo object
that contains whatever information was found.