com.sun.enterprise.deployment.deploy.shared
Class MultiReadableArchive

java.lang.Object
  extended by com.sun.enterprise.deploy.shared.AbstractReadableArchive
      extended by com.sun.enterprise.deployment.deploy.shared.MultiReadableArchive
All Implemented Interfaces:
Archive, ReadableArchive

@Service
@Scoped(value=org.jvnet.hk2.component.PerLookup.class)
public class MultiReadableArchive
extends AbstractReadableArchive

Implements ReadableArchive based on multiple underlying ReadableArchives, each of which will be processed in order when looking up entries, finding the manifest, etc.

Author:
tjquinn

Field Summary
 
Fields inherited from class com.sun.enterprise.deploy.shared.AbstractReadableArchive
extraData
 
Constructor Summary
MultiReadableArchive()
           
 
Method Summary
 void close()
           
 boolean delete()
           
 Enumeration<String> entries()
           
 Enumeration<String> entries(String prefix)
           
 boolean exists()
           
 boolean exists(String name)
           
 long getArchiveSize()
           
 Collection<String> getDirectories()
           
 InputStream getEntry(String name)
           
 long getEntrySize(String name)
           
 Manifest getManifest()
           
 String getName()
           
 ReadableArchive getParentArchive()
          get the parent archive of this archive
 ReadableArchive getSubArchive(String name)
           
 URI getURI()
           
 URI getURI(int slot)
           
 boolean isDirectory(String name)
           
 void open(URI... uris)
           
 void open(URI uri)
           
 boolean renameTo(String name)
           
 void setParentArchive(ReadableArchive parentArchive)
          set the parent archive for this archive
 
Methods inherited from class com.sun.enterprise.deploy.shared.AbstractReadableArchive
getExtraData, removeExtraData, setExtraData
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MultiReadableArchive

public MultiReadableArchive()
Method Detail

getEntry

public InputStream getEntry(String name)
                     throws IOException
Throws:
IOException

exists

public boolean exists(String name)
               throws IOException
Throws:
IOException

getEntrySize

public long getEntrySize(String name)

open

public void open(URI uri)
          throws IOException
Throws:
IOException

open

public void open(URI... uris)
          throws IOException
Throws:
IOException

getSubArchive

public ReadableArchive getSubArchive(String name)
                              throws IOException
Throws:
IOException

exists

public boolean exists()

delete

public boolean delete()

renameTo

public boolean renameTo(String name)

setParentArchive

public void setParentArchive(ReadableArchive parentArchive)
Description copied from class: AbstractReadableArchive
set the parent archive for this archive

Specified by:
setParentArchive in interface ReadableArchive
Overrides:
setParentArchive in class AbstractReadableArchive
Parameters:
parentArchive - the parent archive

getParentArchive

public ReadableArchive getParentArchive()
Description copied from class: AbstractReadableArchive
get the parent archive of this archive

Specified by:
getParentArchive in interface ReadableArchive
Overrides:
getParentArchive in class AbstractReadableArchive
Returns:
the parent archive

close

public void close()
           throws IOException
Throws:
IOException

entries

public Enumeration<String> entries()

entries

public Enumeration<String> entries(String prefix)

getDirectories

public Collection<String> getDirectories()
                                  throws IOException
Throws:
IOException

isDirectory

public boolean isDirectory(String name)

getManifest

public Manifest getManifest()
                     throws IOException
Throws:
IOException

getURI

public URI getURI()

getURI

public URI getURI(int slot)

getArchiveSize

public long getArchiveSize()
                    throws SecurityException
Throws:
SecurityException

getName

public String getName()


Copyright © 2012 GlassFish Community. All Rights Reserved.