git://source.jalview.org
/
jalview.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
JAL-3633 refactored/simplified LaunchUtils code
[jalview.git]
/
getdown
/
src
/
getdown
/
core
/
src
/
main
/
java
/
jalview
/
util
/
ChannelProperties.java
diff --git
a/getdown/src/getdown/core/src/main/java/jalview/util/ChannelProperties.java
b/getdown/src/getdown/core/src/main/java/jalview/util/ChannelProperties.java
index
cf3b190
..
40f6110
100644
(file)
--- a/
getdown/src/getdown/core/src/main/java/jalview/util/ChannelProperties.java
+++ b/
getdown/src/getdown/core/src/main/java/jalview/util/ChannelProperties.java
@@
-1,6
+1,9
@@
package jalview.util;
import java.awt.Image;
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;
import java.io.IOException;
import java.io.InputStream;
import java.net.URL;
@@
-122,14
+125,22
@@
public class ChannelProperties
}
}
}
}
- 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());
+ }
}
}
}
}