src/java/io/bazel/rulesscala/jar/JarHelper.java
/**
   * This copies the contents of jarFile into out
   * This is a static method to make it clear what is mutated (and it
   * was written by someone who really likes to minimize state changes).
   */
This copies the contents of jarFile into out
This is a static method to make it clear what is mutated (and it
was written by someone who really likes to minimize state changes).
This copies the contents of jarFile into out This is a static method to make it clear what is mutated ( and it was written by someone who really likes to minimize state changes ) .
private void copyJar(JarFile nameJf, Set<String> names, JarOutputStream out) throws IOException {
    byte[] buffer = new byte[2048];
    for (Enumeration<JarEntry> e = nameJf.entries(); e.hasMoreElements();) {
      JarEntry existing = e.nextElement();
      String name = existing.getName();
      if (!(ignoreFileName(name) || names.contains(name))) {
        JarEntry outEntry = new JarEntry(name);
        outEntry.setTime(existing.getTime());
        outEntry.setSize(existing.getSize());
        out.putNextEntry(outEntry);
        InputStream in = nameJf.getInputStream(existing);
        while (0 < in.available()) {
          int read = in.read(buffer);
          out.write(buffer, 0, read);
        }
        in.close();
        out.closeEntry();
        names.add(name);
      }
    }
  }
private void copyJar ( JarFile nameJf , Set < String > names , JarOutputStream out ) throws IOException { byte [ ] buffer = new byte [ 2048 ] ; for ( Enumeration < JarEntry > e = nameJf . entries ( ) ; e . hasMoreElements ( ) ; ) { JarEntry existing = e . nextElement ( ) ; String name = existing . getName ( ) ; if ( ! ( ignoreFileName ( name ) || names . contains ( name ) ) ) { JarEntry outEntry = new JarEntry ( name ) ; outEntry . setTime ( existing . getTime ( ) ) ; outEntry . setSize ( existing . getSize ( ) ) ; out . putNextEntry ( outEntry ) ; InputStream in = nameJf . getInputStream ( existing ) ; while ( 0 < in . available ( ) ) { int read = in . read ( buffer ) ; out . write ( buffer , 0 , read ) ; } in . close ( ) ; out . closeEntry ( ) ; names . add ( name ) ; } } }
This copies the contents of jarFile into out
 This is a static method to make it clear what is mutated (and it
 was written by someone who really likes to minimize state changes).
This copies the contents of jarFile into out This is a static method to make it clear what is mutated ( and it was written by someone who really likes to minimize state changes ) .