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


                        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

                        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

        FileOutputStream out = new FileOutputStream( new File( "/Users/michaelneale/edson.jar" ) );
        JarOutputStream jout = new JarOutputStream( out );
        JarEntry je = new JarEntry( "br/com/auster/TestClass1.class" );
        jout.putNextEntry( je );
        jout.write( data );
        jout.closeEntry();
        jout.close();
    }

    @Test
    public void testEquals() {
View Full Code Here

        FileOutputStream out = new FileOutputStream( new File( "/Users/michaelneale/edson.jar" ) );
        JarOutputStream jout = new JarOutputStream( out );
        JarEntry je = new JarEntry( "br/com/auster/TestClass1.class" );
        jout.putNextEntry( je );
        jout.write( data );
        jout.closeEntry();
        jout.close();
    }

    public void testEquals() {
        try {
View Full Code Here

    JarOutputStream jout = new JarOutputStream(result);

    JarEntry metaModel = new JarEntry("factmodel.xml");
    jout.putNextEntry(metaModel);
    jout.write(toXML(facts));
    jout.closeEntry();

    String packagePath = packageName.replace('.', '/');

    for (int i = 0; i < facts.length; i++) {
      ClassBuilder cb = new ClassBuilder();
View Full Code Here

        classDef.addField(new FieldDefinition(fd.name, fd.type));
      }
            JarEntry je = new JarEntry(packagePath + "/" + facts[i].name + ".class");
            jout.putNextEntry(je);
            jout.write(cb.buildClass(classDef));
            jout.closeEntry();
    }
    jout.flush();
    jout.close();

    return result.toByteArray();
View Full Code Here

            byte InputData[] = new byte[BUFFER];
            while ((len = is.read(InputData)) != EOF)
            {
               jos.write(InputData, 0, len);
            }
            jos.closeEntry();
         }
         else if (di instanceof FileDataInstance)
         {
            di.getJarOut(true, jos);
         }
View Full Code Here

            byte InputData[] = new byte[BUFFER];
            while ((len = is.read(InputData)) != EOF)
            {
               jos.write(InputData, 0, len);
            }
            jos.closeEntry();
            is.close();
         }
         else if (di instanceof FileDataInstance)
         {
            di.setType("Jar");
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.