Examples of ZipEntry


Examples of java.util.zip.ZipEntry

    File    update_file = null;
   
    try{
      zip = new ZipInputStream(data);

      ZipEntry entry = null;

      while((entry = zip.getNextEntry()) != null) {

        String name = entry.getName().trim();

        if ( name.equals( "azureus.sig" ) || name.endsWith( "/" ) || name.length() == 0 ){
         
          continue;
        }
View Full Code Here

Examples of java.util.zip.ZipEntry

           String chmod_command = findCommand( "chmod" );
          
          try{
          while( true ){
                       
            ZipEntry  entry = zis.getNextEntry();
             
            if ( entry == null ){
             
              break;
            }
           
            if ( entry.isDirectory()){
             
              continue;
            }
           
            String  name = entry.getName();
           
            FileOutputStream  entry_os   = null;
            File        entry_file   = null;
           
            if ( !name.endsWith("/")){
View Full Code Here

Examples of java.util.zip.ZipEntry

      OutputStream out = new FileOutputStream(tmpFile);
      if (out != null) {
        // Create a zip output on file 
        zipOut = new ZipOutputStream(out);
        // Write furniture description file in first entry
        zipOut.putNextEntry(new ZipEntry(DefaultFurnitureCatalog.PLUGIN_FURNITURE_CATALOG_FAMILY + ".properties"));
        writeFurnitureLibraryProperties(zipOut, furnitureLibrary, furnitureLibraryFile,
            offlineFurnitureLibrary, contentMatchingFurnitureName,
            furnitureResourcesRemoteAbsoluteUrlBase, furnitureResourcesRemoteRelativeUrlBase,
            contentEntries);
        zipOut.closeEntry();
        // Write supported languages description files
        for (String language : furnitureLibrary.getSupportedLanguages()) {
          if (!FurnitureLibrary.DEFAULT_LANGUAGE.equals(language)) {
            zipOut.putNextEntry(new ZipEntry(DefaultFurnitureCatalog.PLUGIN_FURNITURE_CATALOG_FAMILY + "_" + language + ".properties"));
            writeFurnitureLibraryLocalizedProperties(zipOut, furnitureLibrary, language);
            zipOut.closeEntry();
          }
        }       
        // Write Content objects in files
View Full Code Here

Examples of java.util.zip.ZipEntry

     
      UpdateInstaller installer = checker.createInstaller();

      zip = new ZipInputStream(data);

      ZipEntry entry = null;

      while ((entry = zip.getNextEntry()) != null) {

        String name = entry.getName();

        if (name.toLowerCase().startsWith("windows/")) {

          // win32 only files
View Full Code Here

Examples of java.util.zip.ZipEntry

                new BufferedInputStream( new FileInputStream( file ) ));
         
         
            while( properties == null ){
             
              ZipEntry  entry = zis.getNextEntry();
               
              if ( entry == null ){
               
                break;
              }
           
              String  zip_name = entry.getName().toLowerCase( MessageText.LOCALE_ENGLISH );
           
              // System.out.println( "zis1:" + zip_name );
             
              if ( zip_name.equals( "plugin.properties" ) || zip_name.endsWith( "/plugin.properties")){
               
                properties  = new Properties();
               
                properties.load( zis );
                               
              }else if ( zip_name.endsWith( ".jar" )){
               
                ZipInputStream  zis2 = new ZipInputStream( zis );
               
                while( properties == null ){
                 
                  ZipEntry  entry2 = zis2.getNextEntry();
                   
                  if ( entry2 == null ){
                   
                    break;
                  }
               
                  String  zip_name2 = entry2.getName().toLowerCase( MessageText.LOCALE_ENGLISH );
             
                  // System.out.println( "    zis2:" + zip_name2 );
                 
                  if ( zip_name2.equals( "plugin.properties" )){
                   
View Full Code Here

Examples of java.util.zip.ZipEntry

      sig.initVerify( key );
     
      while( true ){
       
        ZipEntry  entry = zis.getNextEntry();
         
        if ( entry == null ){
         
          break;
        }
     
        if ( entry.isDirectory()){
         
          continue;
        }
       
        String  name = entry.getName();
     
        ByteArrayOutputStream  output = null;
       
        if ( name.equalsIgnoreCase("azureus.sig")){
         
View Full Code Here

Examples of java.util.zip.ZipEntry

     
      UpdateInstaller installer = checker.createInstaller();

      zip = new ZipInputStream(data);

      ZipEntry entry = null;

      while ((entry = zip.getNextEntry()) != null) {

        String name = entry.getName();

        if (name.toLowerCase().startsWith("osx/")) {

          // OSX only files
View Full Code Here

Examples of java.util.zip.ZipEntry

          fin = new FileInputStream(filtersFile);
          bin = new BufferedInputStream(fin, 16384);
        } else if (headerBytes[0] == 0x50 && headerBytes[1] == 0x4b) {
          ZipInputStream zip = new ZipInputStream(bin);

          ZipEntry zipEntry = zip.getNextEntry();
          // Skip small files
          while (zipEntry != null && zipEntry.getSize() < 1024 * 1024) {
            zipEntry = zip.getNextEntry();
          }

          if (zipEntry == null) {
            return;
View Full Code Here

Examples of java.util.zip.ZipEntry

                return true;
            }
            ZipInputStream file = openZip(fileName);
            boolean result = false;
            while (true) {
                ZipEntry entry = file.getNextEntry();
                if (entry == null) {
                    break;
                }
                if (entry.getName().equals(entryName)) {
                    result = true;
                    break;
                }
                file.closeEntry();
            }
View Full Code Here

Examples of java.util.zip.ZipEntry

                return true;
            }
            ZipInputStream file = openZip(fileName);
            boolean result = false;
            while (true) {
                ZipEntry entry = file.getNextEntry();
                if (entry == null) {
                    break;
                }
                String n = entry.getName();
                if (n.equals(entryName)) {
                    result = entry.isDirectory();
                    break;
                } else  if (n.startsWith(entryName)) {
                    if (n.length() == entryName.length() + 1) {
                        if (n.equals(entryName + "/")) {
                            result = true;
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.