package jalview.util;
import java.awt.Image;
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.FileNotFoundException;
import java.io.IOException;
import java.io.InputStream;
import java.net.URL;
}
}
- public static void loadProps(InputStream is)
+ protected static void loadProps(File dir)
{
- try
+ File channelPropsFile = new File(dir, CHANNEL_PROPERTIES_FILENAME);
+ if (channelPropsFile.exists())
{
- channelProps.load(is);
- } catch (IOException e)
- {
- System.err.println(e.getMessage());
+ try
+ {
+ InputStream is = new FileInputStream(channelPropsFile);
+ channelProps.load(is);
+ } catch (FileNotFoundException e)
+ {
+ System.err.println(e.getMessage());
+ } catch (IOException e)
+ {
+ System.err.println(e.getMessage());
+ }
}
}