Class OutputJarArchive

java.lang.Object
com.sun.enterprise.deployment.deploy.shared.JarArchive
com.sun.enterprise.deployment.deploy.shared.OutputJarArchive
All Implemented Interfaces:
AutoCloseable, org.glassfish.api.deployment.archive.Archive, org.glassfish.api.deployment.archive.WritableArchive

@Service(name="jar") @PerLookup public class OutputJarArchive extends JarArchive implements org.glassfish.api.deployment.archive.WritableArchive
Provides an implementation of the Archive that maps to a Jar file @see java.util.jar.JarFile
Author:
Jerome Dochez
  • Constructor Details

    • OutputJarArchive

      public OutputJarArchive()
  • Method Details

    • getArchiveSize

      public long getArchiveSize() throws NullPointerException, SecurityException
      Get the size of the archive
      Specified by:
      getArchiveSize in interface org.glassfish.api.deployment.archive.Archive
      Returns:
      -1 because this is getting created
      Throws:
      NullPointerException
      SecurityException
    • close

      public void close() throws IOException
      close the abstract archive
      Specified by:
      close in interface org.glassfish.api.deployment.archive.Archive
      Specified by:
      close in interface AutoCloseable
      Throws:
      IOException
    • getJarEntry

      protected JarEntry getJarEntry(String entryName)
      Specified by:
      getJarEntry in class JarArchive
    • create

      public void create(URI path) throws IOException
      Specified by:
      create in interface org.glassfish.api.deployment.archive.WritableArchive
      Throws:
      IOException
    • entries

      public Enumeration<String> entries()
      Specified by:
      entries in interface org.glassfish.api.deployment.archive.Archive
    • getDirectories

      public Collection<String> getDirectories() throws IOException
      Specified by:
      getDirectories in interface org.glassfish.api.deployment.archive.Archive
      Throws:
      IOException
    • getManifest

      public Manifest getManifest() throws IOException
      Specified by:
      getManifest in interface org.glassfish.api.deployment.archive.Archive
      Throws:
      IOException
    • getURI

      public URI getURI()
      Specified by:
      getURI in interface org.glassfish.api.deployment.archive.Archive
    • createSubArchive

      public org.glassfish.api.deployment.archive.WritableArchive createSubArchive(String name) throws IOException
      Specified by:
      createSubArchive in interface org.glassfish.api.deployment.archive.WritableArchive
      Throws:
      IOException
    • putNextEntry

      public org.glassfish.api.deployment.archive.WritableArchiveEntry putNextEntry(String name) throws IOException
      Specified by:
      putNextEntry in interface org.glassfish.api.deployment.archive.WritableArchive
      Throws:
      IOException