Package java.util.zip

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


                        creator.finishNode();
                        if ( pos != -1 ) {
                            creator.finishNode();
                        }
                    }
                    zis.closeEntry();
                }

            } while ( entry != null );
            creator.finishNode();
        } finally {
View Full Code Here


        ZipEntry zentry = null;
        while ((zentry = jstream.getNextEntry()) != null) {
            if (trimTrailingSlashes(zentry.getName()).equals(entry)) {
                return jstream;
            }
            jstream.closeEntry();
        }
        throw new FileNotFoundException("entry '" + entry + "' not found in " + jar);
    }
}
View Full Code Here

            String line;
            while((line = br.readLine()) != null) {
              parseManifestLine(line);
            }
          } else {
            zis.closeEntry();
          }
        }
      } finally {
        Closer.close(zis);
      }
View Full Code Here

            // Read the file. Throw if there is a CRC error.
            // Note that java.util.zip.ZipInputStream only checks the CRC for compressed
            // files, so this is not entirely foolproof.
            long size = ze.getSize();
            FileUtil.copy(zis, new NullOutputStream(), size);
          zis.closeEntry();
        }
      }
    } finally {
      Closer.close(zis);
    }
View Full Code Here

                        }
                        finally {
                            closeSilently(output);
                        }
                    }
                    input.closeEntry();
                }
            }
            finally {
                closeSilently(input);
            }
View Full Code Here

                while ((n = zipinputstream.read(buf, 0, 1024)) > -1) {
                    fileoutputstream.write(buf, 0, n);
                }

                fileoutputstream.close();
                zipinputstream.closeEntry();
                zipentry = zipinputstream.getNextEntry();

            }

            zipinputstream.close();
View Full Code Here

                      while ((length = zipInput.read(buffer))>0)
                      {
                        unzippedFileOut.write(buffer, 0, length);
                      }
                     
                      zipInput.closeEntry();
                      unzippedFileOut.close();
                  }
              }
            
              zipInput.close();
View Full Code Here

          // if count is not known, use infinite logarithmic progress
          if (fileCnt <= 0)
            progress.setWorkRemaining(DEFAULT_FILE_COUNT);
        }
      }
      zin.closeEntry();
      entry = zin.getNextEntry();
    }
    zin.close();
  }
View Full Code Here

                                while ((n = input.read(buf, 0, 1024)) > -1) {
                                    out.write(buf, 0, n);
                                }
                                out.close();
                            }
                            input.closeEntry();
                            entry = input.getNextEntry();
                        }
                    } catch (Exception e) {
                        ErrorUtils.tossError("Error extracting native libraries");
                        Logger.logError("", e);
View Full Code Here

                    while ((n = zipinputstream.read(buf, 0, 1024)) > -1) {
                        fileoutputstream.write(buf, 0, n);
                    }
                    fileoutputstream.close();
                }
                zipinputstream.closeEntry();
                zipentry = zipinputstream.getNextEntry();
            }
        } catch (Exception e) {
            Logger.logError("Error while extracting zip", e);
            backupExtract(zipLocation, outputLocation);
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.