Package java.util.jar

Examples of java.util.jar.JarInputStream.closeEntry()


            ZipEntry zipEntry;
            while( (zipEntry = jar.getNextEntry()) != null ) {
                if( zipEntry.getName().endsWith(".fmd") && !zipEntry.isDirectory()) {
                    load(null, jar);
                }
                jar.closeEntry();
            }
        } finally {
            jar.close();
        }
    }
View Full Code Here


                }
            }
            final byte[] bytes = new byte[offset];
            System.arraycopy(hbytes, 0, bytes, 0, offset);
            _resourceMap.put(name, bytes);
            jis.closeEntry();
        }
    }

    @Override
    public Class findClass(final String className) throws ClassNotFoundException {
View Full Code Here

                } catch (Exception e) {
                    logger.log(Level.SEVERE, "Exception while processing " + ja.getName()
                            + " of size " + ja.getSize(), e);
                }
            } finally {
                jis.closeEntry();
            }
        }
        jis.close();
    }
View Full Code Here

                            e.printStackTrace();
                        }
                    }
                }

                jarStream.closeEntry();
                jarEntry = jarStream.getNextJarEntry();
            }
        }
        catch ( IOException e )
        {
View Full Code Here

      // Copy entries from the real jar to our virtual jar
      for (JarEntry ze = jin.getNextJarEntry(); ze != null; ze = jin.getNextJarEntry()) {
        jarOut.putNextEntry(ze);
        byte[] b = readEntryBytes(jin, entryDataBuffer);
        jarOut.write(b, 0, b.length);
        jin.closeEntry();
        jarOut.closeEntry();
      }
    }
    finally {
      closeStreams(in, jin, out, jarOut);
View Full Code Here

                        patches.put(cp.sourceClassName, cp);
                    }
                }
                else
                {
                    jis.closeEntry();
                }
            }
            catch (IOException e)
            {
            }
View Full Code Here

                                + " of size " + ja.getSize(), e);
                    }
                } finally {
                    // this is here to catch the spurious "java.io.EOFException:Unexpected end of ZLIB input stream"
                    try {
                      jis.closeEntry();
                    } catch (Exception e) {
                      logger.log(Level.FINE, "swallowing error", e);
                    }
                }
            }
View Full Code Here

      if (entry.getName().contains(directoryName)) {

        if (entry.isDirectory()) {
          // make sure the directory exists
          file.mkdirs();
          jin.closeEntry();
        }
        else {
          // make sure the directory exists
          File parent = file.getParentFile();
          if (parent != null && !parent.exists()) {
View Full Code Here

          while ((len = jin.read(buffer, 0, buffer.length)) != -1) {
            out.write(buffer, 0, len);
          }
          out.flush();
          out.close();
          jin.closeEntry();
          file.setLastModified(entry.getTime());
        }
      }
      entry = jin.getNextEntry();
    }
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.