Package java.util.jar

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


                    } finally {
                        SVNFileUtil.closeFile(fos);
                        SVNFileUtil.closeFile(fis);
                    }
                }
                jis.closeEntry();
            }
        } catch (IOException e) {
            SVNErrorMessage err = SVNErrorMessage.create(SVNErrorCode.IO_ERROR, "Can not extract repository files from ''{0}'' to ''{1}''",
                    new Object[] {srcFile, dst});
            err.setChildErrorMessage(SVNErrorMessage.create(SVNErrorCode.IO_ERROR, e.getLocalizedMessage()));
View Full Code Here


                jos.write(copyBuf, 0, len);
              }
            }
          }

          jis.closeEntry();
          jos.closeEntry();
        }

        // If the file is not found, add it
        if (!found) {
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

                    ClassPatch cp = readPatch(entry, jis);
                    patchlist.put(cp.sourceClassName.replace('.', '/') + ".class", cp);
                }
                else
                {
                    jis.closeEntry();
                }
            }
            catch (IOException e)
            {
            }
View Full Code Here

  jo.write(ba, 0, ba.length);

  // copy the remaining entries, discarding the old preferred list
  while ((entry = ji.getNextJarEntry()) != null) {
      if (entry.getName().equals("META-INF/PREFERRED.LIST")) {
    ji.closeEntry();
    continue;
      }
      jo.putNextEntry(entry);
      ba = new byte[1000];
      int size;
View Full Code Here

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

            {
               out.write(buffer, 0, len);
            }
            out.flush();
            out.close();
            jin.closeEntry();
            file.setLastModified(entry.getTime());
         }
         entry = jin.getNextEntry();
      }
      /* Explicity write out the META-INF/MANIFEST.MF so that any headers such
View Full Code Here

                    } finally {
                        SVNFileUtil.closeFile(fos);
                        SVNFileUtil.closeFile(fis);
                    }
                }
                jis.closeEntry();
            }
        } catch (IOException e) {
            SVNErrorMessage err = SVNErrorMessage.create(SVNErrorCode.IO_ERROR, "Can not extract repository files from ''{0}'' to ''{1}''",
                    new Object[] {srcFile, dst});
            err.setChildErrorMessage(SVNErrorMessage.create(SVNErrorCode.IO_ERROR, e.getLocalizedMessage()));
View Full Code Here

                    // Write out the assembled WAR file to the EAR
                    warBytesOut.writeTo( earOut );

                    earOut.flush();
                    earOut.closeEntry();
                    earIn.closeEntry();
                   
                } else {
                   
                    earOut.putNextEntry( entry );
                    IOUtils.copy( earIn, earOut );
View Full Code Here

                    earOut.putNextEntry( entry );
                    IOUtils.copy( earIn, earOut );
                   
                    earOut.flush();
                    earOut.closeEntry();
                    earIn.closeEntry();
                   
                }
            }           
           
        } finally {
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.