Révision 897

tmp/org.txm.utils/src/org/txm/utils/DiffPrint.java (revision 897)
556 556
    }
557 557
    String[] a = new String[s.size()];
558 558
    s.copyInto(a);
559
    rdr.close();
559 560
    return a;
560 561
  }
561 562

  
tmp/org.txm.utils/src/org/txm/utils/zip/Zip.java (revision 897)
558 558
	{
559 559
		ArrayList<String> list = new ArrayList<String>();
560 560
		Enumeration<?> zipEntries;
561
		ZipFile zip = null;
561 562
		try {
562
			zipEntries = new ZipFile(zipFile).entries();
563
			zip = new ZipFile(zipFile);
564
			zipEntries = zip.entries();
563 565
			while (zipEntries.hasMoreElements()) {
564 566
				list.add(((ZipEntry)zipEntries.nextElement()).getName());
565 567
			}
566 568
			Collections.sort(list);
567
			return list;
568 569
		} catch (Exception e) {
569 570
			System.out.println("Fail to list files of "+zipFile+": "+e);
570 571
			Log.printStackTrace(e);
571 572
			return new ArrayList<String>();
572
		} 		
573
		} finally {
574
			if (zip != null) {
575
				try {
576
					zip.close();
577
				} catch (IOException e) {
578
					// TODO Auto-generated catch block
579
					e.printStackTrace();
580
				}
581
			}
582
		}
583
		return list;
573 584
	}
574 585

  
575 586

  
tmp/org.txm.utils/src/org/txm/utils/CharsetDetector.java (revision 897)
65 65
		if(!encodings.containsKey(guessedCharset))
66 66
			encodings.put(guessedCharset, 0);
67 67
		encodings.put(guessedCharset, encodings.get(guessedCharset)+1);
68
		fis.close();
68 69
	}
69 70
	
70 71
	public String getEncoding()
tmp/org.txm.tokenizer.core/META-INF/MANIFEST.MF (revision 897)
6 6
Automatic-Module-Name: org.txm.tokenizer.core
7 7
Bundle-RequiredExecutionEnvironment: JavaSE-1.7
8 8
Export-Package: org.txm.tokenizer
9
Require-Bundle: org.txm.libs.groovy-all;bundle-version="2.3.7",
10
 org.txm.utils;bundle-version="1.0.0"
9
Require-Bundle: org.txm.libs.groovy-all;bundle-version="2.3.7";visibility:=reexport,
10
 org.txm.utils;bundle-version="1.0.0";visibility:=reexport

Formats disponibles : Unified diff