Revision 32420 branches/v2_0_0_prep/extensions/org.gvsig.installer/org.gvsig.installer.lib/org.gvsig.installer.lib.impl/src/main/java/org/gvsig/installer/lib/impl/execution/Decompress.java

View differences:

Decompress.java
83 83
	public void decompressPlugins(InputStream is, File outputDirectory) throws InstallerExecutionServiceException {
84 84
		option = OPTION_DECOMPRESS;
85 85
		this.outputDirectory = outputDirectory;
86

  
87
		is.mark(0);	
86
		
88 87
		decompressFolderOfPlugins(is);
89 88
	}
90 89

  
91 90
	public void readInstallInfo(InputStream is, List<InstallerInfo> installerInfos, Map<InstallerInfo, String> zipEntriesMap) throws InstallerExecutionServiceException{
92 91
		option = OPTION_READ_INSTALLINFO;
93 92
		this.readedIinstallerInfos = installerInfos;
94
		this.zipEntriesMap = zipEntriesMap;
95
		is.mark(0);		
93
		this.zipEntriesMap = zipEntriesMap;	
96 94
		decompressFolderOfPlugins(is);			
97 95
	}	
98 96

  
......
109 107
	public InputStream searchPlugin(InputStream is, String zipEntry) throws InstallerExecutionServiceException{
110 108
		ZipEntry entry = null;		
111 109

  
112
		try {			
113
			is.reset();
110
		try {		
114 111
			ZipInputStream zipInputStream = new ZipInputStream(is);	
115 112

  
116 113
			while((entry = zipInputStream.getNextEntry()) != null) {	
......
121 118
			}
122 119
			zipInputStream.closeEntry();
123 120

  
124
			//zipInputStream.close();			
121
			zipInputStream.close();			
125 122
		} catch (Exception e) {
126 123
			throw new InstallerExecutionServiceException("Error reading the plugin", e);
127 124
		} 	
......
158 155
					readPlugin(new ZipInputStream(zipInputStream), entry.getName());
159 156
				}
160 157
				zipInputStream.closeEntry();
161
			}
162
			zipInputStream.closeEntry();
163

  
164
			//zipInputStream.close();			
158
			}			
159
			zipInputStream.close();	
160
			
165 161
		} catch (Exception e) {
166 162
			throw new InstallerExecutionServiceException("Error reading the plugin", e);
167 163
		} 			
......
182 178
				readedIinstallerInfos.add(installerInfo);					
183 179
			}
184 180
			zipInputStream.closeEntry();
185
		}	
181
		}			
182
		//zipInputStream.close();	
186 183
		
187 184
		if (installerInfoNumber == zipEntriesMap.size()){
188 185
			InstallerInfo installerInfo = new DefaultInstallerInfo();
......
222 219
				fos.flush();		
223 220
				fos.close();	
224 221
			}
225
			zipInputStream.closeEntry();
222
			//zipInputStream.closeEntry();
226 223
		}
227 224
	}	
228 225

  

Also available in: Unified diff