1 15 16 18 41 package ixenon.free.util; 42 43 import java.io.*; import java.net.*; import java.awt.Image ; import java.awt.Font ; import java.awt.FontMetrics ; import java.awt.Color ; import java.awt.Toolkit ; import java.awt.image.*; 53 import java.util.Enumeration ; import java.util.Hashtable ; import java.util.StringTokenizer ; import java.util.Locale ; import java.util.ResourceBundle ; 58 import java.util.MissingResourceException ; 59 60 137 public final class ApplicationResources 138 { 139 public static boolean debug=false; 141 142 public final String PREFIX_DIR = "__PREFIX__"; 143 144 145 public final String EXEC_PREFIX_DIR = "__EXEC_PREFIX__"; 146 147 148 public final String IMAGES_DIR = "__IMAGE_DIR__"; 149 150 151 public final String AUDIO_DIR = "__AUDIO_DIR__"; 152 153 154 public final String WEB_ROOT_URL = "__URL__"; 155 156 161 private static ApplicationResources singleton=null; 162 private ResourceBundle bundle; 163 private String appClassName; 164 private String searchPath; 165 private String prefix; 166 private String execPrefix; 167 private String audioDir; 168 private String imagesDir; 169 private String webRootURL; 170 171 172 public final String DEFAULT_IMAGE_NAME="default_image"; 173 174 175 private static Image imageDefault=null; 176 177 178 private static Hashtable imageCache=null; 179 180 private static byte DEFAULT_IMAGE_DATA[] = { 182 (byte)0x47, (byte)0x49, (byte)0x46, (byte)0x38, (byte)0x39, (byte)0x61, (byte)0x18, (byte)0x0, (byte)0x18, (byte)0x0, 183 (byte)0xc2, (byte)0x0, (byte)0x0, (byte)0xff, (byte)0xff, (byte)0xff, (byte)0x0, (byte)0x0, (byte)0x0, (byte)0xff, 184 (byte)0x0, (byte)0x0, (byte)0xff, (byte)0xff, (byte)0x0, (byte)0x0, (byte)0x0, (byte)0x80, (byte)0xff, (byte)0xff, 185 (byte)0xff, (byte)0xff, (byte)0xff, (byte)0xff, (byte)0xff, (byte)0xff, (byte)0xff, (byte)0x21, (byte)0xfe, (byte)0xe, 186 (byte)0x4d, (byte)0x61, (byte)0x64, (byte)0x65, (byte)0x20, (byte)0x77, (byte)0x69, (byte)0x74, (byte)0x68, (byte)0x20, 187 (byte)0x47, (byte)0x49, (byte)0x4d, (byte)0x50, (byte)0x0, (byte)0x2c, (byte)0x0, (byte)0x0, (byte)0x0, (byte)0x0, 188 (byte)0x18, (byte)0x0, (byte)0x18, (byte)0x0, (byte)0x0, (byte)0x3, (byte)0x65, (byte)0x8, (byte)0xba, (byte)0xdc, 189 (byte)0xfe, (byte)0x2f, (byte)0x4, (byte)0x48, (byte)0x59, (byte)0x10, (byte)0x62, (byte)0x56, (byte)0x78, (byte)0x71, 190 (byte)0xde, (byte)0x91, (byte)0xf7, (byte)0x81, (byte)0x96, (byte)0x88, (byte)0x69, (byte)0x24, (byte)0xd0, (byte)0xd, 191 (byte)0xc3, (byte)0x99, (byte)0xaa, (byte)0x1e, (byte)0xeb, (byte)0xa1, (byte)0xdb, (byte)0xca, (byte)0xb6, (byte)0x63, 192 (byte)0x1d, (byte)0x13, (byte)0x4, (byte)0x9e, (byte)0x53, (byte)0x36, (byte)0x9e, (byte)0xec, (byte)0x17, (byte)0xc2, 193 (byte)0xb0, (byte)0x84, (byte)0x3e, (byte)0x9a, (byte)0xc3, (byte)0x36, (byte)0x40, (byte)0xe2, (byte)0x94, (byte)0x25, 194 (byte)0xe3, (byte)0xb1, (byte)0x37, (byte)0x24, (byte)0x2e, (byte)0x98, (byte)0x4d, (byte)0xea, (byte)0x10, (byte)0xa, 195 (byte)0x93, (byte)0x4e, (byte)0x6f, (byte)0xc9, (byte)0xa5, (byte)0x17, (byte)0x4c, (byte)0x76, (byte)0x45, (byte)0x5, 196 (byte)0x64, (byte)0x67, (byte)0x95, (byte)0x86, (byte)0xfd, (byte)0x96, (byte)0x73, (byte)0x1d, (byte)0x34, (byte)0x79, 197 (byte)0xbe, (byte)0x56, (byte)0xc4, (byte)0x4d, (byte)0x78, (byte)0xbc, (byte)0xe6, (byte)0x9e, (byte)0xef, (byte)0xc3, 198 (byte)0x25, (byte)0x80, (byte)0x81, (byte)0x82, (byte)0x82, (byte)0x2f, (byte)0x1b, (byte)0x9, (byte)0x0, (byte)0x3b, 199 }; 200 201 205 private ApplicationResources( ResourceBundle bundle, String appClassName ) 206 { 207 this.bundle = bundle; 209 this.appClassName = appClassName; 210 String osname = System.getProperty("os.name"); 211 String fileSep = System.getProperty("file.separator"); 212 String userHome = System.getProperty("user.home"); 213 214 String propFile; 219 if ( osname.startsWith("Windows 95") || 220 osname.startsWith("Windows 98") || 221 osname.startsWith("Windows NT") || 222 osname.startsWith("Windows 2000") || 223 osname.startsWith("OS/2") ) 224 propFile = "_" + appClassName + fileSep + appClassName + ".properties"; 226 else 227 propFile = "." + appClassName + fileSep + appClassName +".properties"; 229 230 Environment.readEnvironment( normalizePathname(propFile) ); 236 237 if ( System.getProperty("env.DEBUG_RESOURCES") != null) 238 debug=true; 240 241 prefix = System.getProperty( "env.PREFIX", PREFIX_DIR ); 242 execPrefix = System.getProperty( "env.EXEC_PREFIX", EXEC_PREFIX_DIR ); 243 audioDir = System.getProperty( "env.AUDIO_DIR", AUDIO_DIR ); 244 imagesDir = System.getProperty( "env.IMAGES_DIR", IMAGES_DIR ); 245 webRootURL = System.getProperty( "env.WEB_ROOT_URL", WEB_ROOT_URL ); 246 247 if (debug) { 248 System.out.println( "(*DEBUG*) Creating application resources:"); 249 System.out.println( " prefix=`"+prefix+"'"); 250 System.out.println( " exec_prefix=`"+execPrefix+"'"); 251 System.out.println( " audio_dir=`"+audioDir+"'"); 252 System.out.println( " images_dir=`"+imagesDir+"'"); 253 System.out.println( "web_root_url=`"+webRootURL+"'"); 254 } 255 } 256 257 264 public static ApplicationResources createInstance( ResourceBundle bundle, String appClassName ) 265 { 266 if (singleton == null) 268 singleton = new ApplicationResources( bundle, appClassName ); 269 return (singleton); 270 } 271 272 277 public static ApplicationResources getInstance() 278 { 279 if (singleton == null) 281 throw new NullPointerException ( "no singleton was ever created!" ); 282 return (singleton); 283 } 284 285 286 public ResourceBundle getResourceBundle() 287 { 288 return (bundle); 289 } 290 291 314 public static String getDefaultApplicationSearchPath() 315 { 316 StringBuffer defPath = new StringBuffer (); 318 String osname = System.getProperty("os.name"); 319 String pathSep = System.getProperty("path.separator"); 320 String fileSep = System.getProperty("file.separator"); 321 322 defPath.append( "%T/%L/%N%S;" ); 323 defPath.append( "%T/%N%S;" ); 324 defPath.append( "%N%S;" ); 325 defPath.append( "%H"+fileSep+"%T"+fileSep+"%L"+fileSep+"%N%S;" ); 326 defPath.append( "%H"+fileSep+"%T"+fileSep+"%N%S;" ); 327 defPath.append( "%H"+fileSep+"%N%S;" ); 328 defPath.append( "%P"+fileSep+"%T"+fileSep+"%L"+fileSep+"%N%S;" ); 329 defPath.append( "%P"+fileSep+"%T"+fileSep+"%N%S;" ); 330 defPath.append( "%P"+fileSep+"%N%S;" ); 331 332 if (osname.startsWith("Windows 95") || 333 osname.startsWith("Windows 98") || 334 osname.startsWith("Windows NT")) { 335 defPath.append( "C:\\Program Files\\Default"+fileSep+"%T"+fileSep+"%L"+fileSep+"%N%S;"); 336 defPath.append( "C:\\Program Files\\Default"+fileSep+"%T"+fileSep+"%N%S;"); 337 defPath.append( "C:\\Program Files\\Default"+fileSep+"%N%S;"); 338 } 339 else { 340 defPath.append( fileSep+"usr"+fileSep+"local"+fileSep+"%T"+fileSep+"%L"+fileSep+"%N%S;" ); 342 defPath.append( fileSep+"usr"+fileSep+"local"+fileSep+"%T"+fileSep+"%N%S;" ); 343 defPath.append( fileSep+"usr"+fileSep+"local"+fileSep+"%N%S;" ); 344 } 345 346 if (debug) 347 System.out.println("*DEBUG* calculated default search path = `" + 348 defPath.toString() + "'" ); 349 return defPath.toString(); 351 } 352 353 358 public String getResourceString( String name, String def ) 359 { 360 String ret; 361 362 try { ret = bundle.getString( appClassName + "." + name ); } 363 catch (MissingResourceException e) { ret = def; } 364 return (ret); 365 } 366 367 372 public int getResourceMnemonic( String name, int def ) 373 { 374 int ret; 375 376 try { 377 String temp = bundle.getString( appClassName + "." + name ); 378 ret = (temp != null) ? temp.charAt(0) : def; 380 381 } 382 catch (MissingResourceException e) { ret = def; } 383 return (ret); 384 } 385 386 391 public int getResourceInteger( String name, int def ) 392 { 393 int ret; 394 395 try { 396 String temp = bundle.getString( appClassName + "." + name ); 397 ret = (temp != null) ? Integer.parseInt( temp.trim() ) : def; 399 400 } 401 catch (MissingResourceException e) { ret = def; } 402 return (ret); 403 } 404 405 410 public long getResourceLong( String name, long def ) 411 { 412 long ret; 413 414 try { 415 String temp = bundle.getString( appClassName + "." + name ); 416 ret = (temp != null) ? Long.parseLong( temp.trim() ) : def; 418 419 } 420 catch (MissingResourceException e) { ret = def; } 421 return (ret); 422 } 423 424 429 public double getResourceFloat( String name, float def ) 430 { 431 float ret; 432 433 try { 434 String temp = bundle.getString( appClassName + "." + name ); 435 ret = (temp != null) ? Float.valueOf( temp.trim() ).floatValue() : def; 437 438 } 439 catch (MissingResourceException e) { ret = def; } 440 return (ret); 441 } 442 443 448 public double getResourceDouble( String name, double def ) 449 { 450 double ret; 451 452 try { 453 String temp = bundle.getString( appClassName + "." + name ); 454 ret = (temp != null) ? Double.valueOf( temp.trim() ).doubleValue() : def; 456 457 } 458 catch (MissingResourceException e) { ret = def; } 459 return (ret); 460 } 461 462 468 public String substituteString( String input_string, 469 String match_string, String replace_string ) 470 { 471 String result = input_string; 472 473 int pos = input_string.indexOf( match_string ); 474 if ( pos >= 0 ) { 475 int len = match_string.length(); 476 String left = "", right = ""; 477 if (pos > 1) 478 left = input_string.substring( 0, pos ); 479 if (pos < input_string.length() - len - 1) 480 right = input_string.substring( pos+len ); 481 482 result = new String ( left + replace_string + right ); 483 } 484 485 return result; 486 } 487 488 490 public String replaceTokens( String path, SubstitutionRecord[] recs ) 491 { 492 int j; 493 494 for (j=0; j<recs.length; ++j) { 495 if ( recs[j].token != null && recs[j].string != null ) 496 path = substituteString( path, recs[j].token, recs[j].string ); 497 } 498 return (path); 499 } 500 501 512 public String getSearchPath() 513 { 514 if (searchPath == null) { 516 searchPath = System.getProperty( "env.JAVAFILESEARCHPATH" ); 517 if (searchPath == null) 518 searchPath = 520 getResourceString( "applicationSearchPath", 521 getDefaultApplicationSearchPath() ); 522 if (debug) 523 System.out.println("*DEBUG* " + getClass().getName() + 524 ".getSearchPath() searchPath=`" + searchPath + "'" ); 525 } 526 return (searchPath); 527 } 528 529 530 544 public boolean isURL( String url_string ) 545 { 546 int idx1=-1, idx2=-1; 547 idx1 = url_string.indexOf("://"); 548 if ( idx1 < 1 ) 549 return (false); 550 if ( idx1 > url_string.length() + 3 ) 551 idx2 = url_string.indexOf("/", idx1 + 3 ); 552 554 return (idx1 < idx2); 555 } 556 557 610 public String resolvePathname( String type, String filename, String suffix ) 611 { 612 if (type == null) type=""; 614 if (filename == null) filename=""; 615 if (suffix == null) suffix=""; 616 617 SubstitutionRecord subs[] = new SubstitutionRecord[15]; 619 int k; 620 for (k=0; k<subs.length; ++k) subs[k] = new SubstitutionRecord(); 621 622 getSearchPath(); 624 625 k=0; 627 subs[k].token = "%P"; subs[k].string = prefix ; ++k; 628 629 subs[k].token = "%B"; subs[k].string = execPrefix ; ++k; 631 632 subs[k].token = "%H"; subs[k].string = System.getProperty("user.home") ; ++k; 634 635 subs[k].token = "~"; subs[k].string = System.getProperty("user.home") ; ++k; 637 638 subs[k].token = "%A"; subs[k].string = audioDir ; ++k; 640 641 subs[k].token = "%I"; subs[k].string = imagesDir ; ++k; 643 644 subs[k].token = "%T"; subs[k].string = type ; ++k; 646 647 subs[k].token = "%N"; subs[k].string = filename ; ++k; 649 650 subs[k].token = "%S"; subs[k].string = suffix ; ++k; 652 653 subs[k].token = "%Z"; subs[k].string = webRootURL ; ++k; 655 656 String language = Locale.getDefault().getLanguage(); 658 String country = Locale.getDefault().getCountry(); 659 String variant = Locale.getDefault().getVariant(); 660 661 String temp = language; 662 if ( country.length() > 0 ) 663 temp += "_" + country; 664 if ( variant.length() > 0 ) 665 temp += "_" + variant; 666 667 subs[k].token = "%L"; subs[k].string = temp ; ++k; 668 subs[k].token = "%l"; subs[k].string = language; ++k; 669 subs[k].token = "%t"; subs[k].string = country ; ++k; 670 subs[k].token = "%v"; subs[k].string = variant ; ++k; 671 672 if (debug) { 673 System.out.println(getClass().getName() + ".resolvePathname(...)" ); 674 System.out.println(" type=`" + type + "'" ); 675 System.out.println(" filename=`" + filename + "'" ); 676 System.out.println(" suffix=`" + suffix + "'" ); 677 System.out.println(" final language %L = `"+ temp +"'" ); 678 System.out.println(" i18n language=`"+language+"' country=`"+country+ 679 "' variant=`"+variant+"'" ); 680 } 681 682 boolean bfDone = false; 684 StringTokenizer st = new StringTokenizer ( searchPath, " ;\t\n"); 685 String filePath,returnPath = null; 686 687 while ( st.hasMoreTokens() && !bfDone ) { 688 filePath = st.nextToken(); 690 691 if (debug) System.out.println("filePath=`" + filePath + "'\t *BEFORE* substitutions" ); 695 filePath = replaceTokens( filePath, subs ); 696 if (debug) System.out.print("filePath=`" + filePath + "'\t *AFTER* substitutions ... " ); 697 698 String tmp = normalizePathname( filePath ); 702 File file = new File( tmp ); 703 if ( file.exists() && file.canRead() ) { 704 if (debug) System.out.println("*FOUND FILE*"); 706 returnPath = tmp; 707 bfDone = true; 708 } 709 else if ( isURL(filePath) ) { 710 try { 712 URL url = new URL( filePath ); 714 try { 715 InputStream is = url.openStream(); 719 if (debug) System.out.println("*FOUND URL*"); 720 returnPath = filePath; 721 bfDone = true; 722 is.close(); 723 } 724 catch (IOException ioe ) { ; } 725 726 } 727 catch ( MalformedURLException mue) { ; } 728 } 729 else { 730 URL url = getClass().getClassLoader().getSystemResource( filePath ); 748 if (url != null) { 749 try { 750 InputStream is = url.openStream(); 752 returnPath = url.toExternalForm(); 753 if (debug) 754 System.out.println("*FOUND RESOURCE URL*\n"+ "exported url: "+returnPath ); 755 bfDone = true; 756 is.close(); 757 } 758 catch (IOException ioe ) { ; } 759 } 760 } 761 762 if (debug) System.out.println(""); 763 } 764 765 return (returnPath); 767 } 768 769 774 protected byte[] getImageData( String url_image ) 775 { 776 byte[] imageBytes=null; 777 if (debug) System.out.println( "getImageData("+url_image+")" ); 778 779 InputStream imageStream=null; String tmp = normalizePathname( url_image ); 784 File imageFile = new File(tmp); 785 if ( imageFile.exists() && imageFile.canRead() ) { 786 try { 787 imageStream = new FileInputStream( tmp ); 788 } 789 catch ( FileNotFoundException fe ) { 790 imageStream = null; 791 } 792 } 793 794 if (imageStream == null) { 795 try { 800 URL url = new URL( url_image ); 801 imageStream = url.openStream(); 805 if (debug) System.out.println("*opening stream URL*"); 806 } 807 catch (IOException ioe ) { 808 imageStream = null; 809 } 810 } 811 812 if (imageStream == null) { 813 imageStream = getClass().getClassLoader().getSystemResourceAsStream(url_image); 819 } 820 821 Image img = null; 822 if (debug) 823 System.out.println("imageStream:" + 824 ((imageStream==null) ?"NULL!!":"EXISTS") ); 825 if ( imageStream != null ) { 826 ByteArrayOutputStream baos = new ByteArrayOutputStream(); 827 828 try { 829 byte [] buffer = new byte[8192]; 832 BufferedInputStream bis = new BufferedInputStream( imageStream ); 833 int total_bytes=0; 834 int num_bytes; 835 while ( (num_bytes = bis.read( buffer )) > 0 ) { 836 baos.write( buffer, 0, num_bytes ); 837 total_bytes += num_bytes; 838 } 839 imageBytes = baos.toByteArray(); 840 } 842 catch (IOException ex) { 843 System.err.println( getClass().getName()+".getImageData: failed to load image from URL: " + url_image ); 844 } 845 finally { 846 try { imageStream.close(); } catch (IOException e) { ; } 847 } 848 } 849 850 if (debug && imageBytes != null) 851 System.out.println( "imageBytes.length = "+imageBytes.length+" byte(s)"); 852 853 return (imageBytes); 854 } 855 856 883 public Image getImage( String type, String filename, String suffix ) 884 { 885 createImageCache(); 887 888 byte[] imageBytes=null; 889 String imagePath; 890 891 if (( filename == null && suffix == null ) || 893 ( filename.length() < 1 && suffix.length() < 1 )) 894 throw new IllegalArgumentException ( "must supply filename and/or suffix" ); 895 896 String imageStoreKey = ""; 900 if ( filename != null) imageStoreKey += filename; 902 if ( suffix != null) imageStoreKey += suffix; 903 904 Image cached_image = (Image )imageCache.get( imageStoreKey ); 905 if (cached_image != null) { 906 if (debug) System.out.println( "retrieve image from *CACHE* # key:"+imageStoreKey+" cached_image:"+cached_image ); 907 return (cached_image); 909 } 910 911 imagePath = resolvePathname( type, filename, suffix ); 912 if (debug) System.out.println( "(1) imagePath=`" +imagePath+ "'" ); 913 if (imagePath != null) { 914 imageBytes = getImageData( imagePath ); 917 } 918 else { 919 URL url; 923 imagePath = (type == null) ? 924 filename : type + "/" + filename; 925 if (suffix != null) 926 imagePath = imagePath + "." + suffix; 927 url = ClassLoader.getSystemResource( imagePath ); 928 if (url == null) { 929 imagePath = filename; 932 if (suffix != null) 933 imagePath = imagePath + "." + suffix; 934 url = ClassLoader.getSystemResource( imagePath ); 935 } 936 937 if (debug) System.out.println( "(2) imagePath="+imagePath); 938 939 if (url != null) { 942 try { 943 InputStream is = url.openStream(); 944 if (debug) System.out.println("*FOUND URL*"); 945 is.close(); 948 imageBytes = getImageData( imagePath ); 949 if (debug) System.out.println( "(3) imagePath="+imagePath ); 950 } 951 catch (IOException ioe ) { ; } 952 } 953 } 954 955 Image img = null; 956 if ( imageBytes !=null && imageBytes.length > 0 ) { 957 img = Toolkit.getDefaultToolkit().createImage(imageBytes); 959 960 if (img != null) { 961 if (debug) System.out.println( "store image in cache # key:"+imageStoreKey ); 965 imageCache.put( imageStoreKey, img ); 966 } 967 } 968 969 if (img == null) { 970 System.err.println("*WARNING*: Sorry, image:`" + imageStoreKey + 972 "' cannot be found, using a default image instead."); 973 img = imageDefault; 974 } 975 976 if (debug) System.out.println("*FINAL* getImage() img="+img); 977 return (img); 978 } 979 980 985 public void uninstallImage( String imageName ) 986 { 987 createImageCache(); 989 990 Image cached_image = (Image )imageCache.get( imageName ); 992 if (cached_image != null) { 993 if (debug) 994 System.out.println("*FINAL* uninstallImage(" + imageName+ 995 ") img="+cached_image); 996 imageCache.put( imageName, null ); 997 } 998 } 999 1000 1001 protected void createImageCache() 1002 { 1003 if ( imageCache == null) { 1004 if (debug) System.out.println( "creating image cache now." ); 1006 imageCache = new Hashtable (); 1007 } 1008 1009 createDefaultImage(); 1010 } 1011 1012 1013 protected void createDefaultImage() 1014 { 1015 if ( imageDefault == null) { 1016 if (debug) System.out.println( "create default image now." ); 1018 1019 imageDefault = Toolkit.getDefaultToolkit().createImage(DEFAULT_IMAGE_DATA); 1021 if (imageDefault != null) { 1022 if (debug) System.out.println( "store image in cache # key:" + DEFAULT_IMAGE_NAME ); 1026 imageCache.put( DEFAULT_IMAGE_NAME, imageDefault ); 1027 } 1028 } 1029 } 1030 1031 1034 public Font getFont( String name ) 1035 { 1036 return Font.getFont( appClassName+"."+name ); 1037 } 1038 1039 1043 public Font getFont( String name, Font def ) 1044 { 1045 return Font.getFont( appClassName+"."+name, def ); 1046 } 1047 1048 1051 public Color getColor( String name ) 1052 { 1053 return Color.getColor( appClassName+"."+name ); 1054 } 1055 1056 1060 public Color getColor( String name, Color def ) 1061 { 1062 return Color.getColor( appClassName+"."+name, def ); 1063 } 1064 1065 1066 public class SubstitutionRecord { 1067 String token=null, string=null; 1068 1069 1070 public SubstitutionRecord() { } 1071 1072 1073 public SubstitutionRecord( String token, String string ) 1074 { 1075 this.token = token; 1076 this.string = string; 1077 } 1078 } 1079 1080 1085 public static String convertUnixPathToNTPath( String unixpath ) 1086 { 1087 StringBuffer ntpath = new StringBuffer (); 1088 1089 for (int j=0; j<unixpath.length(); ++j) { 1090 char ch = unixpath.charAt(j); 1091 if (ch == '/' ) 1092 ch = '\\'; 1093 ntpath.append(ch); 1094 } 1095 1096 return ntpath.toString(); 1097 } 1098 1099 1100 1105 public static String convertNTPathToUnixPath( String ntpath ) 1106 { 1107 StringBuffer unixpath = new StringBuffer (); 1108 1109 for (int j=0; j<ntpath.length(); ++j) { 1110 char ch = ntpath.charAt(j); 1111 if (ch == '\\' ) 1112 ch = '/'; 1113 unixpath.append(ch); 1114 } 1115 1116 return unixpath.toString(); 1117 } 1118 1119 1120 1132 public static String normalizePathname( String pathname ) 1133 { 1134 String fileSep = System.getProperty("file.separator"); 1135 if ( fileSep.equals("/") ) 1136 return convertNTPathToUnixPath( pathname ); 1137 else if ( fileSep.equals("\\") ) 1138 return convertUnixPathToNTPath( pathname ); 1139 1140 return (pathname); 1141 } 1142} 1143 1144 | Popular Tags |