public void putNextEntry(ZipEntry ze) throws IOException {
  if (firstEntry) {
    byte[] edata=ze.getExtra();
    if (edata == null || !hasMagic(edata)) {
      if (edata == null) {
        edata=new byte[4];
      }
 else {
        byte[] tmp=new byte[edata.length + 4];
        System.arraycopy(edata,0,tmp,4,edata.length);
        edata=tmp;
      }
      set16(edata,0,JAR_MAGIC);
      set16(edata,2,0);
      ze.setExtra(edata);
    }
    firstEntry=false;
  }
  super.putNextEntry(ze);
}

public void putNextEntry ( ZipEntry ze ) throws IOException { if ( firstEntry ) { byte [ ] edata = ze . getExtra ( ) ; if ( edata == null || ! hasMagic ( edata ) ) { if ( edata == null ) { edata = new byte [ 4 ] ; } else { byte [ ] tmp = new byte [ edata . length + 4 ] ; System . arraycopy ( edata , 0 , tmp , 4 , edata . length ) ; edata = tmp ; } set16 ( edata , 0 , JAR_MAGIC ) ; set16 ( edata , 2 , 0 ) ; ze . setExtra ( edata ) ; } firstEntry = false ; } super . putNextEntry ( ze ) ; }
begins writing a new jar file entry and positions the stream to the start of the entry data . this method will also close any previous entry . the default compression method will be used if no compression method was specified for the entry . the current time will be used if the entry has no set modification time .
