Package java.util.zip

Examples of java.util.zip.ZipInputStream.closeEntry()


                    entryName = "/" + entryName;
                }
                if (entryName.equals(name)) {
                    ByteArrayOutputStream out = new ByteArrayOutputStream();
                    IOUtils.copy(zipIn, out);
                    zipIn.closeEntry();
                    return out.toByteArray();
                }
                zipIn.closeEntry();
            }
        } catch (IOException e) {
View Full Code Here


                    ByteArrayOutputStream out = new ByteArrayOutputStream();
                    IOUtils.copy(zipIn, out);
                    zipIn.closeEntry();
                    return out.toByteArray();
                }
                zipIn.closeEntry();
            }
        } catch (IOException e) {
            // if this happens we have a real problem
            e.printStackTrace();
        } finally {
View Full Code Here

            {
              lib_jar.write(data, 0, d);
             
            }
            lib_jar.closeEntry();
            input_jar.closeEntry();
          }
        }
        input_jar.close();
        lib_jar.close();
        return true;
View Full Code Here

            bais = new ByteArrayInputStream(toUnzip);
            zis = new ZipInputStream(bais);
            ZipEntry entry;
            while ((entry = zis.getNextEntry()) != null) {
                if(!entry.getName().equals(entryName)) {
                    zis.closeEntry();
                    continue;
                }
                final byte[] utf8Bytes = IoUtils.readBytes(zis);
                return new String(utf8Bytes, Charset.forName("UTF-8"));
            }
View Full Code Here

          entryName = "/" + entryName;
        }
        if (entryName.equals(name)) {
          ByteArrayOutputStream out = new ByteArrayOutputStream();
          IOUtils.copy(zipIn, out);
          zipIn.closeEntry();
          return out.toByteArray();
        }
        zipIn.closeEntry();
      }
    } catch (IOException e) {
View Full Code Here

          ByteArrayOutputStream out = new ByteArrayOutputStream();
          IOUtils.copy(zipIn, out);
          zipIn.closeEntry();
          return out.toByteArray();
        }
        zipIn.closeEntry();
      }
    } catch (IOException e) {
      // if this happens we have a real problem
      e.printStackTrace();
    } finally {
View Full Code Here

                logo = loadLogo(zipentry, zipinputstream);
            }
            else if("descriptor.json".equalsIgnoreCase(entryName)){
                descriptor = loadDescriptor(zipentry, zipinputstream);
            }
            zipinputstream.closeEntry();
            zipentry = zipinputstream.getNextEntry();
        }
        zipinputstream.close();

        if(application != null && logo != null && descriptor != null){
View Full Code Here

                     // this way we can find out what are the required properties before we will actually use them
                     parseReplaceProperties(zip, replaceProperties);
                     replaceProperties.putAll(overrideProperties);
                  }
               }
               zip.closeEntry();
            }
         }
      }
      catch (Exception e)
      {
View Full Code Here

                  if (fullName != null && fullName.equals("META-INF/maven/archetype-metadata.xml"))
                  {
                     parseReplaceProperties(zip, replaceProperties);
                  }
               }
               zip.closeEntry();
            }
         }
      }
      catch (Exception e)
      {
View Full Code Here

                    entries.add(name);
                    if (name.equals("META-INF/MANIFEST.MF")) {
                        map.put(name, build(zis, ze));
                    }
                }
                zis.closeEntry();

            }
        } finally {
            zis.close();
        }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.