org.glassfish.deployapi.config
Class ConfigBeanArchive

java.lang.Object
  extended by com.sun.enterprise.deploy.shared.AbstractReadableArchive
      extended by org.glassfish.deployapi.config.ConfigBeanArchive
All Implemented Interfaces:
Archive, ReadableArchive

public class ConfigBeanArchive
extends AbstractReadableArchive

This class act as an ReadableArchive implementation, delegating all possible APIs to the JSR88 DeployObject object.

Author:
Jerome Dochez

Field Summary
 
Fields inherited from class com.sun.enterprise.deploy.shared.AbstractReadableArchive
extraData, parentArchive
 
Constructor Summary
ConfigBeanArchive(DeployableObject deployObject)
          Creates a new instance of ConfigBeanArchive
 
Method Summary
 void close()
          close the abstract archive
 void closeEntry()
           
 void closeEntry(OutputStream os)
          close a previously returned @see java.io.OutputStream returned by an addEntry call
 void closeEntry(ReadableArchive os)
          close a previously returned @see java.io.OutputStream returned by an addEntry call
 boolean delete()
          delete the archive
 Enumeration entries()
           
 Enumeration<String> entries(String prefix)
           
 boolean exists()
           
 boolean exists(String name)
           
 long getArchiveSize()
           
 String getArchiveUri()
           
 Collection<String> getDirectories()
           
 InputStream getEntry(String name)
           
 long getEntrySize(String name)
           
 Manifest getManifest()
           
 String getName()
           
 ReadableArchive getSubArchive(String name)
          create or obtain a subarchive within this abstraction.
 URI getURI()
           
 boolean isDirectory(String name)
           
 void open(URI uri)
           
 boolean renameTo(String name)
          rename the archive
 boolean supportsElementsOverwriting()
           
 
Methods inherited from class com.sun.enterprise.deploy.shared.AbstractReadableArchive
getExtraData, getParentArchive, removeExtraData, setExtraData, setParentArchive
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ConfigBeanArchive

public ConfigBeanArchive(DeployableObject deployObject)
Creates a new instance of ConfigBeanArchive

Method Detail

close

public void close()
           throws IOException
close the abstract archive

Throws:
IOException

closeEntry

public void closeEntry(ReadableArchive os)
                throws IOException
close a previously returned @see java.io.OutputStream returned by an addEntry call

Parameters:
the - output stream to close
Throws:
IOException

closeEntry

public void closeEntry(OutputStream os)
                throws IOException
close a previously returned @see java.io.OutputStream returned by an addEntry call

Parameters:
the - output stream to close
Throws:
IOException

delete

public boolean delete()
delete the archive


entries

public Enumeration entries()
Returns:
an @see java.util.Enumeration of entries in this abstract archive

entries

public Enumeration<String> entries(String prefix)

getDirectories

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

isDirectory

public boolean isDirectory(String name)

getName

public String getName()

exists

public boolean exists()
Returns:
true if this archive exists

exists

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

getArchiveUri

public String getArchiveUri()
Returns:
the archive uri

getEntrySize

public long getEntrySize(String name)

open

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

getArchiveSize

public long getArchiveSize()
                    throws NullPointerException,
                           SecurityException
Returns:
the archive size
Throws:
NullPointerException
SecurityException

getSubArchive

public ReadableArchive getSubArchive(String name)
                              throws IOException
create or obtain a subarchive within this abstraction.

Parameters:
the - name of the subarchive.
Throws:
IOException

getEntry

public InputStream getEntry(String name)
                     throws IOException
Parameters:
the - entry name
Returns:
a @see java.io.InputStream for an existing entry in the current abstract archive
Throws:
IOException

getManifest

public Manifest getManifest()
                     throws IOException
Returns:
the manifest information for this abstract archive
Throws:
IOException

renameTo

public boolean renameTo(String name)
rename the archive

Parameters:
name - the archive name

supportsElementsOverwriting

public boolean supportsElementsOverwriting()
Returns:
true if this archive abstraction supports overwriting of elements

closeEntry

public void closeEntry()
                throws IOException
Throws:
IOException

getURI

public URI getURI()


Copyright © 2012. All Rights Reserved.