Package java.util.jar

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


                        InputStream in = input.getInputStream(entry);
                        while ((count = in.read(buf)) > -1) {
                            out.write(buf, 0, count);
                        }
                        in.close();
                        out.closeEntry();
                    }
                }
                out.flush();
                out.close();
                input.close();
View Full Code Here


                            int count;
                            while ((count = in.read(buffer)) > 0) {
                                out.write(buffer, 0, count);
                            }
                        } finally {
                            out.closeEntry();
                        }
                    } finally {
                        close(in);
                    }
                }
View Full Code Here

                out = new JarOutputStream(fos, manifest);

                // add the startup file which allows us to locate the startup directory
                out.putNextEntry(new ZipEntry(META_INF_STARTUP_JAR));
                // intentionally empty ZipEntry
                out.closeEntry();
            } else {
                out = new JarOutputStream(fos);
            }

            // write the configurationData
View Full Code Here

                            int count;
                            while ((count = in.read(buffer)) > 0) {
                                out.write(buffer, 0, count);
                            }
                        } finally {
                            out.closeEntry();
                        }
                    } finally {
                        close(in);
                    }
                }
View Full Code Here

                        InputStream in = input.getInputStream(entry);
                        while((count = in.read(buf)) > -1) {
                            out.write(buf, 0, count);
                        }
                        in.close();
                        out.closeEntry();
                    }
                }
                out.flush();
                out.close();
                input.close();
View Full Code Here

                            int count;
                            while ((count = in.read(buffer)) > 0) {
                                out.write(buffer, 0, count);
                            }
                        } finally {
                            out.closeEntry();
                        }
                    } finally {
                        close(in);
                    }
                }
View Full Code Here

        man.getMainAttributes().putValue("Content-Type", "application/zip");
        JarOutputStream jout = new JarOutputStream(new FileOutputStream(provZip), man);
        ZipEntry entry = new ZipEntry(PROVISIONING_AGENT_CONFIG);
        jout.putNextEntry( entry );
        jout.write(new byte[] { 10, 20, 30 });
        jout.closeEntry();
        jout.flush();
        jout.close();
       
        provZip.deleteOnExit();
       
View Full Code Here

        man.getMainAttributes().putValue("Content-Type", "application/zip");
        JarOutputStream jout = new JarOutputStream(new FileOutputStream(provZip), man);
        ZipEntry entry = new ZipEntry(PROVISIONING_AGENT_CONFIG);
        jout.putNextEntry( entry );
        jout.write(new byte[] { 10, 20, 30 });
        jout.closeEntry();
        jout.flush();
        jout.close();
       
        provZip.deleteOnExit();
       
View Full Code Here

        if ( null != jarName )
        {
            JarOutputStream jar = new JarOutputStream( new FileOutputStream( jarName ) );
            jar.putNextEntry( new ZipEntry( "META-INF/maven/remote-resources.xml" ) );
            jar.write( data.getBytes() );
            jar.closeEntry();

            for ( int x = 0; x < resourceNames.length; x++ )
            {
                File resource = new File( resourceDir, resourceNames[x] );
                InputStream in = new FileInputStream( resource );
View Full Code Here

                File resource = new File( resourceDir, resourceNames[x] );
                InputStream in = new FileInputStream( resource );
                jar.putNextEntry( new ZipEntry( resourceNames[x] ) );
                IOUtil.copy( in, jar );
                IOUtil.close( in );
                jar.closeEntry();
            }
            jar.close();
        }
    }
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.