Package java.util.zip

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


    if (debug)
      System.out.println("RAConfig.extractFromJAR(" + fileName +  "," + reader + ")");

    ZipInputStream stream = new ZipInputStream(reader);
    ZipEntry currEntry = stream.getNextEntry();
    while (stream.available() > 0) {
      if (currEntry == null) break;
      if (currEntry.getName().equalsIgnoreCase(fileName)) {
        // the fileName is found, return the InputStream.
        if (debug)
          System.out.println("RAConfig.extractFromJAR : currEntry = " + currEntry);
View Full Code Here


        File tmp = null;

        // loop through the elements in the zip file and parse every single file inside
        while (true) {
            try {
                if (zis.available() <= 0) break;
                entry = zis.getNextEntry();
                if (entry == null) break;
                if (entry.isDirectory() || entry.getSize() <= 0) continue;
                final String name = entry.getName();
                final int idx = name.lastIndexOf('.');
View Full Code Here

         */
       
        // BEGIN HACK
        ByteArrayOutputStream baos = new ByteArrayOutputStream();
        int b;
        while (zin.available() != 0) {
      b = zin.read();
      if (b == -1)
          break;
      baos.write(b);
        }
View Full Code Here

        tldFound = true;
        parseTLD(bais);
    } else {
        ByteArrayOutputStream baos = new ByteArrayOutputStream();
        int b;
        while (zin.available() != 0) {
      b = zin.read();
      if (b == -1)
          break;
      baos.write(b);
        }
View Full Code Here

    InputStream stream = null;
    ZipInputStream zipStream = null;
    try {
      stream = jarFile.openStream();
      zipStream = new ZipInputStream(stream);
      while (zipStream.available() > 0) {
        ZipEntry nextEntry = zipStream.getNextEntry();
        if (nextEntry == null || nextEntry.isDirectory()) {
          continue;
        }
        String name = "/" + nextEntry.getName();
View Full Code Here

      InputStream stream = null;
      ZipInputStream zipStream = null;
      try {
        stream = jarFile.openStream();
        zipStream = new ZipInputStream(stream);
        while (zipStream.available() > 0) {
          ZipEntry nextEntry = zipStream.getNextEntry();
          if (nextEntry == null || nextEntry.isDirectory()) {
            continue;
          }
          String name = "/" + nextEntry.getName();
View Full Code Here

         */
       
        // BEGIN HACK
        ByteArrayOutputStream baos = new ByteArrayOutputStream();
        int b;
        while (zin.available() != 0) {
      b = zin.read();
      if (b == -1)
          break;
      baos.write(b);
        }
View Full Code Here

        tldFound = true;
        parseTLD(bais);
    } else {
        ByteArrayOutputStream baos = new ByteArrayOutputStream();
        int b;
        while (zin.available() != 0) {
      b = zin.read();
      if (b == -1)
          break;
      baos.write(b);
        }
View Full Code Here

          }
        }
      }
    } else {
      ZipInputStream inputStream = new ZipInputStream(new ByteArrayInputStream(mZipBuffer));
      if (inputStream.available() == 0) {
        throw new IllegalArgumentException("Could not unzip the given ODF package!");
      } else {
        ZipEntry zipEntry = inputStream.getNextEntry();
        if (zipEntry != null) {
          firstEntryName = zipEntry.getName();
View Full Code Here

            ZipEntry entry = zin.getNextEntry();
            if (entry==null) {
                break;
            }

            while (zin.available()>0) {
                zin.skip(zin.available());
            }
        }
    }
}
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.