source: trunk/gsdl3/src/java/org/greenstone/gsdl3/util/Misc.java@ 7444

Last change on this file since 7444 was 7444, checked in by kjdon, 20 years ago

added in an isWindows function

  • Property svn:keywords set to Author Date Id Revision
File size: 720 bytes
Line 
1
2package org.greenstone.gsdl3.util;
3
4
5import java.util.HashMap;
6import java.util.Set;
7import java.util.Map;
8import java.util.Iterator;
9import java.util.Properties;
10
11/** contains miscellaneous functions */
12public class Misc {
13
14 public static void printHash(HashMap map) {
15 Set entries = map.entrySet();
16 Iterator i = entries.iterator();
17 while (i.hasNext()) {
18 Map.Entry m = (Map.Entry)i.next();
19 String name = (String)m.getKey();
20 String value = (String)m.getValue();
21 }
22 }
23
24 public static boolean isWindows() {
25 Properties props = System.getProperties();
26 String os_name = props.getProperty("os.name","");
27 if(os_name.startsWith("Windows")) {
28 return true;
29 }
30 return false;
31 }
32
33}
Note: See TracBrowser for help on using the repository browser.