frameworkplugins/com.nokia.s60tools.sdk/src/com/nokia/s60tools/sdk/SdkUtils.java
author dpodwall
Tue, 12 Jan 2010 13:17:53 -0600
changeset 0 61163b28edca
permissions -rw-r--r--
initial EPL conversion
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
0
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
     1
/*
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
     2
* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). 
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
     3
* All rights reserved.
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
     4
* This component and the accompanying materials are made available
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
     5
* under the terms of "Eclipse Public License v1.0"
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
     6
* which accompanies this distribution, and is available
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
     7
* at the URL "http://www.eclipse.org/legal/epl-v10.html".
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
     8
*
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
     9
* Initial Contributors:
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
    10
* Nokia Corporation - initial contribution.
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
    11
*
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
    12
* Contributors:
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
    13
*
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
    14
* Description:
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
    15
*
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
    16
*/
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
    17
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
    18
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
    19
package com.nokia.s60tools.sdk;
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
    20
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
    21
import java.io.File;
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
    22
import java.io.FileInputStream;
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
    23
import java.util.HashMap;
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
    24
import java.util.zip.ZipEntry;
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
    25
import java.util.zip.ZipInputStream;
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
    26
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
    27
/**
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
    28
 * Utility class for getting SDK/Platform related information.
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
    29
 */
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
    30
public class SdkUtils {
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
    31
	
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
    32
	/**
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
    33
	 * Platform folders that are ignored when map folders are searched.
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
    34
	 * Win* folders are ignored if excludeWinFolders is true.
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
    35
	 */
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
    36
	private static final String[] IGNORED_PLATFORM_FOLDERS = {
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
    37
		"tools",//$NON-NLS-1$
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
    38
		"thumb"}; //$NON-NLS-1$
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
    39
	
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
    40
	/**
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
    41
	 * Folders that are ignore when getting build types.
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
    42
	 */
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
    43
	private static final String[] IGNORED_BUILD_FOLDERS = {
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
    44
		"lib"}; //$NON-NLS-1$
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
    45
	
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
    46
	/**
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
    47
	 * This class is not meant to be instantiated.
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
    48
	 */
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
    49
	private SdkUtils() {
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
    50
	}
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
    51
	
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
    52
	/**
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
    53
	 * Method goes through all SDKs and searches for folders which can contain .map files. It will collect
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
    54
	 * all folders in to a HashMap. Tools and thumb folders are ignored. Also win* folders
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
    55
	 * are ignored if ecludeWinFolders is true.
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
    56
	 * 
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
    57
	 * HashMap contains e.g.:
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
    58
	 * [S60_32 armv5 UREL][C:\Build_C\S60_3_2_200820\epoc32\release\armv5\UREL]
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
    59
	 * [S60_32 arm9e udeb][C:\Build_C\S60_3_2_200820\epoc32\release\arm9e\UDEB]
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
    60
	 *
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
    61
	 * @param excludeWinFolders defines whether wins, winscw folders are excluded from the result
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
    62
	 * @return HashMap containing sdk names and their map folders
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
    63
	 */
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
    64
	public static HashMap<String, String> getSdkMapFileFolders(boolean excludeWinFolders) {
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
    65
		return getSdkMapFileFolders(excludeWinFolders, false);
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
    66
	}
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
    67
	
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
    68
	/**
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
    69
	 * Method goes through all SDKs and searches for folders which can contain .map files. It will collect
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
    70
	 * all folders in to a HashMap. Tools and thumb folders are ignored. Also win* folders
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
    71
	 * are ignored if ecludeWinFolders is true.
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
    72
	 * 
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
    73
	 * HashMap contains e.g.:
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
    74
	 * [S60_32 armv5 UREL][C:\Build_C\S60_3_2_200820\epoc32\release\armv5\UREL]
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
    75
	 * [S60_32 arm9e udeb][C:\Build_C\S60_3_2_200820\epoc32\release\arm9e\UDEB]
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
    76
	 * 
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
    77
	 * if epocrootPath parameter is true, then HashMap contains e.g.:
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
    78
	 * [S60_32 armv5 UREL][Z:\]
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
    79
	 * [S60_32 arm9e udeb][Z:\]
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
    80
	 *
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
    81
	 * @param excludeWinFolders defines whether wins, winscw folders are excluded from the result
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
    82
	 * @param epocrootPath defines whether folders should be epocroot folders instead of map files folders
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
    83
	 * @return HashMap containing sdk names and their map folders
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
    84
	 */
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
    85
	public static HashMap<String, String> getSdkMapFileFolders(boolean excludeWinFolders, boolean epocrootPath) {
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
    86
		try {
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
    87
			HashMap<String, String> folders = new HashMap<String, String>();
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
    88
		
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
    89
			// get all SDKs
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
    90
			SdkInformation[] sdks = SdkManager.getSdkInformation();
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
    91
			// if SDKs exists
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
    92
			if (sdks != null && sdks.length > 0) {
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
    93
				// go through all SDKs
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
    94
				for (int i = 0; i < sdks.length; i++) {
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
    95
					SdkInformation sdk = sdks[i];
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
    96
					// if SDK's epocroot does not exist, ignore SDK
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
    97
					if (!sdk.epocRootExists())
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
    98
						continue;
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
    99
					// get all SDK's platforms
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
   100
					String[] platforms = sdk.getPlatforms();
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
   101
					// if platforms exist
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
   102
					if (platforms != null && platforms.length > 0) {
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
   103
						// go through all platforms (armv5, gcce, winscw, ...)
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
   104
						for (int j = 0; j < platforms.length; j++) {
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
   105
							String platform = platforms[j];
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
   106
							boolean isWinFolder = platform.toLowerCase().startsWith("win");
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
   107
							
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
   108
							// ignore emulator platforms
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
   109
							if (isWinFolder) {
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
   110
								if (excludeWinFolders) {
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
   111
									continue;
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
   112
								}
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
   113
								// Win folder is accepted, not checking if it is in predefined platforms.
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
   114
							}
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
   115
							// ignoring platforms which shouldn't contain map files.
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
   116
							else if (isIgnoredPlatformFolder(platform)) {
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
   117
								continue;
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
   118
							}
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
   119
							
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
   120
							// get platform's build types (urel, udeb)
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
   121
							String[] buildTypes = sdk.getBuildTypesForPlatform(platform);
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
   122
							// if build types exist
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
   123
							if (buildTypes != null && buildTypes.length > 0) {
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
   124
								// go through all build types
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
   125
								for (int k = 0; k < buildTypes.length; k++) {
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
   126
									String buildType = buildTypes[k];
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
   127
									// Check if is not valid build type.
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
   128
									if(isIgnoredBuildType(buildType)) {
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
   129
										continue;
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
   130
									}
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
   131
									String mapFolder = sdk.getReleaseRootDir() + File.separator;
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
   132
									mapFolder += platform + File.separator + buildType;
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
   133
									
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
   134
									String sdkFormat = sdk.getSdkId() + " " + platform + " " + buildType;
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
   135
									if (epocrootPath)
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
   136
										folders.put(sdkFormat, sdk.getEpocRootDir());
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
   137
									else
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
   138
										folders.put(sdkFormat, mapFolder);
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
   139
								}
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
   140
							}
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
   141
						}
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
   142
					}
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
   143
				}
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
   144
			}
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
   145
			if (folders.size() > 0)
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
   146
				return folders;
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
   147
		} catch (Exception e) {
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
   148
		}
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
   149
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
   150
		return null;
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
   151
	}
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
   152
	
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
   153
	/**
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
   154
	 * Checks whether given type is ignored build type
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
   155
	 * @param buildType type to be checked
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
   156
	 * @return true if build type is ignored, false if not
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
   157
	 */
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
   158
	private static boolean isIgnoredBuildType(String buildType) {
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
   159
		for(String ignoredFolder : IGNORED_BUILD_FOLDERS) {
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
   160
			if(ignoredFolder.equalsIgnoreCase(buildType)) {
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
   161
				return true;
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
   162
			}
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
   163
		}
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
   164
		return false;
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
   165
	}
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
   166
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
   167
	/**
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
   168
	 * checks whether given platform should be ignored
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
   169
	 * @param platform platform to be checked
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
   170
	 * @return true if platform should be ignored files, false if not
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
   171
	 */
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
   172
	private static boolean isIgnoredPlatformFolder(String platform) {
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
   173
		for(String mapFilePlatform : IGNORED_PLATFORM_FOLDERS) {
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
   174
			if(platform.toLowerCase().startsWith(mapFilePlatform.toLowerCase())) {
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
   175
				return true;
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
   176
			}
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
   177
		}
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
   178
		return false;
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
   179
	}
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
   180
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
   181
	/**
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
   182
	 * Checks whether given folder contains any .map files.
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
   183
	 * This method takes can time, if there are many files in the folder.
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
   184
	 * @param folder folder to be checked for .map files
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
   185
	 * @return true if folder contains .map files, false if not
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
   186
	 */
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
   187
	public static boolean folderContainsMapFiles(String folder) {
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
   188
		File path = new File(folder);
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
   189
		if (path.isDirectory() && path.exists()) {
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
   190
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
   191
			String[] files = path.list();
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
   192
			if (files != null && files.length > 0) {
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
   193
				for (int i = 0; i < files.length; i++) {
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
   194
					if (files[i].endsWith(".map"))
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
   195
						return true;
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
   196
				}
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
   197
			}
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
   198
		}
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
   199
		return false;
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
   200
	}
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
   201
	
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
   202
	/**
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
   203
	 * Checks whether given zip file contains any .map files
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
   204
	 * @param zipFilePath zip file's path
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
   205
	 * @return true if zip file contains .map files, false if not
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
   206
	 */
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
   207
	public static boolean zipContainsMapFiles(String zipFilePath) {
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
   208
		try {
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
   209
			FileInputStream fis = new FileInputStream(zipFilePath);
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
   210
			ZipInputStream zis = new ZipInputStream(fis);
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
   211
			ZipEntry ze;
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
   212
			while((ze=zis.getNextEntry())!=null){
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
   213
				if (ze.getName().toLowerCase().endsWith("map")) { //$NON-NLS-1$
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
   214
					zis.closeEntry();
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
   215
					zis.close();
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
   216
					return true;
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
   217
				}
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
   218
				zis.closeEntry();
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
   219
			}
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
   220
			zis.close();
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
   221
		} catch (Exception e) {
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
   222
		}
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
   223
		
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
   224
		return false;
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
   225
	}	
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
   226
}