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(java.io.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
 java.util.Enumeration entries()
           
 java.util.Enumeration<java.lang.String> entries(java.lang.String prefix)
           
 boolean exists()
           
 boolean exists(java.lang.String name)
           
 long getArchiveSize()
           
 java.lang.String getArchiveUri()
           
 java.util.Collection<java.lang.String> getDirectories()
           
 java.io.InputStream getEntry(java.lang.String name)
           
 long getEntrySize(java.lang.String name)
           
 java.util.jar.Manifest getManifest()
           
 java.lang.String getName()
           
 ReadableArchive getSubArchive(java.lang.String name)
          create or obtain a subarchive within this abstraction.
 java.net.URI getURI()
           
 boolean isDirectory(java.lang.String name)
           
 void open(java.net.URI uri)
           
 boolean renameTo(java.lang.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 java.io.IOException
close the abstract archive

Throws:
java.io.IOException

closeEntry

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

Parameters:
the - output stream to close
Throws:
java.io.IOException

closeEntry

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

Parameters:
the - output stream to close
Throws:
java.io.IOException

delete

public boolean delete()
delete the archive


entries

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

entries

public java.util.Enumeration<java.lang.String> entries(java.lang.String prefix)

getDirectories

public java.util.Collection<java.lang.String> getDirectories()
                                                      throws java.io.IOException
Throws:
java.io.IOException

isDirectory

public boolean isDirectory(java.lang.String name)

getName

public java.lang.String getName()

exists

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

exists

public boolean exists(java.lang.String name)
               throws java.io.IOException
Throws:
java.io.IOException

getArchiveUri

public java.lang.String getArchiveUri()
Returns:
the archive uri

getEntrySize

public long getEntrySize(java.lang.String name)

open

public void open(java.net.URI uri)
          throws java.io.IOException
Throws:
java.io.IOException

getArchiveSize

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

getSubArchive

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

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

getEntry

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

getManifest

public java.util.jar.Manifest getManifest()
                                   throws java.io.IOException
Returns:
the manifest information for this abstract archive
Throws:
java.io.IOException

renameTo

public boolean renameTo(java.lang.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 java.io.IOException
Throws:
java.io.IOException

getURI

public java.net.URI getURI()


Copyright © 2012 GlassFish Community. All Rights Reserved.