IKVM11  11
Java SE 11 Virtual Machine for .NET
Loading...
Searching...
No Matches
JarFile.cs
Go to the documentation of this file.
1/*
2 Copyright (C) 2007-2015 Jeroen Frijters
3 Copyright (C) 2009 Volker Berlin (i-net software)
4
5 This software is provided 'as-is', without any express or implied
6 warranty. In no event will the authors be held liable for any damages
7 arising from the use of this software.
8
9 Permission is granted to anyone to use this software for any purpose,
10 including commercial applications, and to alter it and redistribute it
11 freely, subject to the following restrictions:
12
13 1. The origin of this software must not be misrepresented; you must not
14 claim that you wrote the original software. If you use this software
15 in a product, an acknowledgment in the product documentation would be
16 appreciated but is not required.
17 2. Altered source versions must be plainly marked as such, and must not be
18 misrepresented as being the original software.
19 3. This notice may not be removed or altered from any source distribution.
20
21 Jeroen Frijters
22 jeroen@frijters.net
23
24*/
25using System;
26using System.Collections.Generic;
27
29{
30
31 static class JarFile
32 {
33
34 public static string[] getMetaInfEntryNames(object thisJarFile)
35 {
36#if FIRST_PASS
37 return null;
38#else
39 global::java.util.zip.ZipFile zf = (global::java.util.zip.ZipFile)thisJarFile;
40 global::java.util.Enumeration entries = zf.entries();
41 List<string> list = null;
42 while (entries.hasMoreElements())
43 {
44 global::java.util.zip.ZipEntry entry = (global::java.util.zip.ZipEntry)entries.nextElement();
45 if (entry.getName().StartsWith("META-INF/", StringComparison.OrdinalIgnoreCase))
46 {
47 if (list == null)
48 {
49 list = new List<string>();
50 }
51 list.Add(entry.getName());
52 }
53 }
54
55 return list == null ? null : list.ToArray();
56#endif
57 }
58
59 }
60
61}
static string[] getMetaInfEntryNames(object thisJarFile)
Definition JarFile.cs:34