publicvoidreadPreferences(String filename)
throws IllegalArgumentException{
if (filename == null){
thrownew IllegalArgumentException("filename is null");
} //if//...perform other operations...
InputStream in = new FileInputStream(filename);
//...read the preferences file...
}